home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / inter36a.zip / INTERRUP.D < prev    next >
Text File  |  1993-08-01  |  341KB  |  9,161 lines

  1. Interrupt List, part 4 of 10
  2. This compilation is Copyright (c) 1989,1990,1991,1992,1993 Ralf Brown
  3. --------D-2142-------------------------------
  4. INT 21 - DOS 2+ - "LSEEK" - SET CURRENT FILE POSITION
  5.     AH = 42h
  6.     AL = origin of move
  7.         00h start of file
  8.         01h current file position
  9.         02h end of file
  10.     BX = file handle
  11.     CX:DX = offset from origin of new file position
  12. Return: CF clear if successful
  13.         DX:AX = new file position in bytes from start of file
  14.     CF set on error
  15.         AX = error code (01h,06h) (see AH=59h)
  16. Notes:    for origins 01h and 02h, the pointer may be positioned before the
  17.       start of the file; no error is returned in that case, but subsequent
  18.       attempts at I/O will produce errors
  19.     if the new position is beyond the current end of file, the file will
  20.       be extended by the next write (see AH=40h)
  21. BUG:    using this method to grow a file from zero bytes to a very large size
  22.       can corrupt the FAT in some versions of DOS; the file should first
  23.       be grown from zero to one byte and then to the desired large size
  24. SeeAlso: AH=24h,INT 2F/AX=1228h
  25. --------v-214203-----------------------------
  26. INT 21 - VIRUS - "Shake" - INSTALLATION CHECK
  27.     AX = 4203h
  28. Return: AX = 1234h if resident
  29. SeeAlso: AX=3DFFh,AX=4243h
  30. --------v-214243-----------------------------
  31. INT 21 - VIRUS - "Invader" - INSTALLATION CHECK
  32.     AX = 4243h
  33. Return: AX = 5678h if resident
  34. SeeAlso: AX=4203h,AX=4B04h
  35. --------D-214300-----------------------------
  36. INT 21 - DOS 2+ - GET FILE ATTRIBUTES
  37.     AX = 4300h
  38.     DS:DX -> ASCIZ filename
  39. Return: CF clear if successful
  40.         CX = file attributes (see AX=4301h)
  41.         AX = CX (DR-DOS 5.0)
  42.     CF set on error
  43.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  44. Notes:    under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  45.     under DR-DOS 3.41 and 5.0, attempts to change the subdirectory bit are
  46.       simply ignored without an error
  47. SeeAlso: AX=4301h,AX=4310h,AH=B6h,INT 2F/AX=110Fh
  48. --------D-214301-----------------------------
  49. INT 21 - DOS 2+ - "CHMOD" - SET FILE ATTRIBUTES
  50.     AX = 4301h
  51.     CX = new file attributes (see below)
  52.     DS:DX -> ASCIZ filename
  53. Return: CF clear if successful
  54.         AX destroyed
  55.     CF set on error
  56.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  57. Notes:    will not change volume label or directory attribute bits, but will
  58.       change the other attribute bits of a directory (the directory
  59.       bit must be cleared to successfully change the other attributes of a
  60.       directory, but the directory will not be changed to a normal file as
  61.       a result)
  62.     MS-DOS 4.01 reportedly closes the file if it is currently open
  63.     for security reasons, the Novell NetWare execute-only bit can never
  64.       be cleared; the file must be deleted and recreated
  65.     under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  66.     DOS 5.0 SHARE will close the file if it is currently open in sharing-
  67.       compatibility mode, otherwise a sharing violation critical error is
  68.       generated if the file is currently open
  69. SeeAlso: AX=4300h,AX=4311h,INT 2F/AX=110Eh
  70.  
  71. Bitfields for file attributes:
  72.  bit 7    shareable (Novell NetWare)
  73.  bit 6    unused
  74.  bit 5    archive
  75.  bit 4    directory
  76.  bit 3    volume label
  77.     execute-only (Novell NetWare)
  78.  bit 2    system
  79.  bit 1    hidden
  80.  bit 0    read-only
  81. --------O-214302-----------------------------
  82. INT 21 - DR-DOS 3.41+ internal - GET ACCESS RIGHTS
  83.     AX = 4302h
  84.     DS:DX -> ASCIZ pathname
  85. Return: CF clear if successful
  86.         CX = access rights (see below)
  87.         AX = CX (DR-DOS 5.0)
  88.     CF set on error
  89.         AX = error code
  90. Desc:    Determine which operations the calling program may perform on a
  91.       specified file without being required to provide a password.
  92. Notes:    this protection scheme has been coordinated on all current Digital
  93.       Research/Novell operating systems (DR-DOS 3.41+, DRMDOS 5.x, and
  94.       FlexOS 2+)
  95.     this function is documented in DR-DOS 6.0 and corresponds to the
  96.       "Get/Set File Attributes" function, subfunction 2, documented in
  97.       Concurrent DOS.
  98.     only FlexOS actually uses the "execution" bits; DR-DOS 3.41+ treats
  99.       them as "read" bits.
  100.     DR-DOS 3.41-5.x only use bits 0-3.  Only DR-DOS 6.0 using a
  101.       DRMDOS 5.x security system allowing for users and groups uses bits
  102.       4-11.
  103. SeeAlso: AX=4303h
  104.  
  105. Bitfields for access rights:
  106.  bit 0    owner delete requires password
  107.  bit 1    owner execution requires password (FlexOS)
  108.  bit 2    owner write requires password
  109.  bit 3    owner read requires password
  110.  bit 4    group delete requires password
  111.  bit 5    group execution requires password (FlexOS)
  112.  bit 6    group write requires password
  113.  bit 7    group read requires password
  114.  bit 8    world delete requires password
  115.  bit 9    world execution requires password (FlexOS)
  116.  bit 10 world write requires password
  117.  bit 11 world read requires password
  118. --------O-214303-----------------------------
  119. INT 21 - DR-DOS 3.41+ internal - SET ACCESS RIGHTS AND PASSWORD
  120.     AX = 4303h
  121.     CX = access rights
  122.          bits 11-0: access rights (see AX=4302h)
  123.          bit 15: new password is to be set
  124.     DS:DX -> ASCIZ pathname
  125.     [DTA] = new password if CX bit 15 is set (blank-padded to 8 characters)
  126. Return: CF clear if successful
  127.     CF set on error
  128.         AX = error code
  129. Notes:    if the file is already protected, the old password must be added after
  130.       the pathname, separated by a ";"
  131.     this function is documented in DR-DOS 6.0 and corresponds to the
  132.       "Get/Set File Attributes" function, subfunction 3, documented in
  133.       Concurrent DOS.
  134. SeeAlso: AH=0Fh,AH=17h,AX=4302h,AX=4305h,AX=4454h
  135. --------O-214304-----------------------------C26!
  136. INT 21 U - DR-DOS 5.0-6.0 internal - GET ENCRYPTED PASSWORD
  137.     AX = 4304h
  138.     DS:DX -> ASCIZ filename
  139.     ???
  140. Return: CF clear if successful
  141.         CX = AX = 0000h if no password assigned to file
  142.     CF set on error
  143.         AX = error code (see AH=59h)
  144. Note:    this function is only supported by DR-DOS 5.0 and 6.0 and DRMDOS 5.1
  145. SeeAlso: AX=4303h,AX=4305h
  146. --------O-214305-----------------------------C26!
  147. INT 21 U - DR-DOS 5.0-6.0 internal - SET EXTENDED FILE ATTRIBUTES
  148.     AX = 4305h
  149.     DS:DX -> ASCIZ filename
  150.     ???
  151. Return: CF clear if successful
  152.     CF set on error
  153.         AX = error code (see AH=59h)
  154. Desc:    this function allows the extended attributes, and optionally the
  155.       encrypted password, of a file to be set.
  156. Note:    this function is only supported by DR-DOS 5.0 and 6.0 and DRMDOS 5.1
  157. SeeAlso: AX=4304h,AX=4311h
  158. --------O-214306-----------------------------C26!
  159. INT 21 - DR-DOS 6.0 - GET FILE OWNER
  160.     AX = 4306h
  161.     DS:DX -> ASCIZ filename
  162. Return: CF clear if successful
  163.         AX = CX = value set with AX=4307h
  164.     CF set on error
  165.         AX = error code (see AH=59h)
  166. SeeAlso: AX=4307h
  167. --------O-214307-----------------------------C26!
  168. INT 21 - DR-DOS 6.0 - SET FILE OWNER
  169.     AX = 4307h
  170.     CX = ??? (owner identification number?)
  171.     DS:DX -> ASCIZ filename
  172. Return: CF clear if successful
  173.     CF set on error
  174.         AX = error code (see AH=59h)
  175. SeeAlso: AX=4306h
  176. --------N-214310-----------------------------
  177. INT 21 - Banyan VINES 2.1+ - GET EXTENDED FILE ATTRIBUTES
  178.     AX = 4310h
  179.     DS:DX -> ASCIZ filename
  180. Return: CF clear if successful
  181.         CH = attributes (see AX=4311h)
  182.     CF set on error
  183.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  184. Note:    the filename may be a directory but must be on a VINES file service
  185. SeeAlso: AX=4300h,AX=4311h,AH=B6h,INT 2F/AX=110Fh
  186. --------N-214311-----------------------------
  187. INT 21 - Banyan VINES 2.1+ - SET EXTENDED FILE ATTRIBUTES
  188.     AX = 4311h
  189.     CH = new attributes
  190.         bit 7: unused
  191.         bit 6: shareable
  192.         bit 5: execute-only
  193.         bits 4-0: unused
  194.     DS:DX -> ASCIZ filename
  195. Return: CF clear if successful
  196.     CF set on error
  197.         AX = error code (01h,02h,03h,05h) (see AH=59h)
  198. Note:    the filename may be a directory but must be on a VINES file service
  199. SeeAlso: AX=4301h,AX=4305h,AX=4310h,INT 2F/AX=110Eh
  200. ----------214380-----------------------------
  201. INT 21 - Novell DOS 7 - UNDELETE PENDING DELETE FILE
  202.     AX = 4380h
  203.     ???
  204. Return: ???
  205. SeeAlso: AH=41h,AX=4381h
  206. ----------214381-----------------------------
  207. INT 21 - Novell DOS 7 - PURGE PENDING DELETE FILE
  208.     AX = 4381h
  209.     ???
  210. Return: ???
  211. SeeAlso: AH=41h,AX=4380h
  212. --------D-214400-----------------------------
  213. INT 21 - DOS 2+ - IOCTL - GET DEVICE INFORMATION
  214.     AX = 4400h
  215.     BX = handle
  216. Return: CF clear if successful
  217.         DX = device information word (see below)
  218.         AX destroyed
  219.     CF set on error
  220.         AX = error code (01h,05h,06h) (see AH=59h)
  221. Notes:    value in DH corresponds to high byte of device driver's attribute word
  222.       if handle refers to a character device
  223.     Novell NetWare reportedly does not return a drive number in bits 5-0
  224.       for a disk file
  225. SeeAlso: AX=4401h,INT 2F/AX=122Bh
  226.  
  227. Bitfields for device information word:
  228.  character device
  229.   bit 14: device driver can process IOCTL requests (see AX=4402h)
  230.   bit 13: output until busy supported
  231.   bit 11: driver supports OPEN/CLOSE calls
  232.   bit  7: set (indicates device)
  233.   bit  6: EOF on input
  234.   bit  5: raw (binary) mode
  235.   bit  4: device is special (uses INT 29)
  236.   bit  3: clock device
  237.   bit  2: NUL device
  238.   bit  1: standard output
  239.   bit  0: standard input
  240.  disk file
  241.   bit 15: file is remote (DOS 3+)
  242.   bit 14: don't set file date/time on closing (DOS 3+)
  243.   bit 11: media not removable
  244.   bit  8: (DOS 4 only) generate INT 24 if no disk space on write or read past
  245.         end of file
  246.   bit  7: clear (indicates file)
  247.   bit  6: file has not been written
  248.   bits 5-0: drive number (0 = A:)
  249. --------D-214401-----------------------------
  250. INT 21 - DOS 2+ - IOCTL - SET DEVICE INFORMATION
  251.     AX = 4401h
  252.     BX = handle (must refer to character device)
  253.     DX = device information word (see AX=4400h)
  254.         (DH must be zero)
  255. Return: CF clear if successful
  256.     CF set on error
  257.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  258. SeeAlso: AX=4400h,INT 2F/AX=122Bh
  259. --------D-214402-----------------------------
  260. INT 21 - DOS 2+ - IOCTL - READ FROM CHARACTER DEVICE CONTROL CHANNEL
  261.     AX = 4402h
  262.     BX = file handle referencing character device
  263.     CX = number of bytes to read
  264.     DS:DX -> buffer
  265. Return: CF clear if successful
  266.         AX = number of bytes actually read
  267.     CF set on error
  268.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  269. Note:    format of data is driver-specific (see below for some specific cases)
  270. SeeAlso: AX=4400h,AX=4403h,AX=4404h,INT 2F/AX=122Bh
  271. --------N-214402-----------------------------
  272. INT 21 - Network Driver Interface Spec 2.0.1 - PROTOCOL MANAGER
  273.     AX = 4402h
  274.     BX = file handle for device "PROTMAN$"
  275.     DS:DX -> request block (see below)
  276.     CX = 000Eh (size of request block)
  277.  
  278. Format of request block for GetProtocolManagerInfo:
  279. Offset    Size    Description
  280.  00h    WORD    01h
  281.  02h    WORD    returned status (see below)
  282.  04h    DWORD    returned pointer to structure representing parsed user config
  283.  08h    DWORD    unused
  284.  0Ch    WORD    returned BCD version of NDIS on which Protocol Manager is based
  285.  
  286. Format of request block for RegisterModule:
  287. Offset    Size    Description
  288.  00h    WORD    02h
  289.  02h    WORD    returned status (see below)
  290.  04h    DWORD    pointer to module's common characteristics table (see below)
  291.  08h    DWORD    pointer to list of modules to which the module is to be bound
  292.  0Ch    WORD    unused
  293.  
  294. Format of request block for BindAndStart:
  295. Offset    Size    Description
  296.  00h    WORD    03h
  297.  02h    WORD    returned status (see below)
  298.  04h    DWORD    caller's virtual address in FailingModules structure
  299.  08h    DWORD    unused
  300.  0Ch    WORD    unused
  301.  
  302. Format of request block for GetProtocolManagerLinkage:
  303. Offset    Size    Description
  304.  00h    WORD    04h
  305.  02h    WORD    returned status (see below)
  306.  04h    DWORD    returned dispatch point
  307.  08h    DWORD    unused
  308.  0Ch    WORD    returned protocol manager DS
  309. Note:    the dispatch point may be called as follows instead of using this IOCTL
  310.     STACK: WORD  protocol manager DS
  311.            DWORD pointer to request block
  312.     Return: AX = returned status
  313.         STACK popped
  314.  
  315. Format of request block for GetProtocolIniPath:
  316. Offset    Size    Description
  317.  00h    WORD    05h
  318.  02h    WORD    returned status (see below)
  319.  04h    DWORD    pointer to a buffer for the ASCIZ pathname of PROTOCOL.INI
  320.  08h    DWORD    unused
  321.  0Ch    WORD    buffer length
  322.  
  323. Format of request block for RegisterProtocolManagerInfo:
  324. Offset    Size    Description
  325.  00h    WORD    06h
  326.  02h    WORD    returned status (see below)
  327.  04h    DWORD    pointer to structure containing parsed user config file
  328.  08h    DWORD    unused
  329.  0Ch    WORD    length of structure
  330.  
  331. Format of request block for InitAndRegister:
  332. Offset    Size    Description
  333.  00h    WORD    07h
  334.  02h    WORD    returned status (see below)
  335.  04h    DWORD    unused
  336.  08h    DWORD    poitner to ASCIZ name of the module to be prebind initialized
  337.  0Ch    WORD    unused
  338.  
  339. Format of request block for UnbindAndStop:
  340. Offset    Size    Description
  341.  00h    WORD    08h
  342.  02h    WORD    returned status (see below)
  343.  04h    DWORD    failing modules as for BindAndStart
  344.  08h    DWORD    if not 0000h:0000h, pointer to ASCIZ name of module to unbind
  345.         if 0000h:0000h, terminate a set of previously dynamically
  346.           bound protocol modules
  347.  0Ch    WORD    unused
  348.  
  349. Format of request block for BindStatus:
  350. Offset    Size    Description
  351.  00h    WORD    09h
  352.  02h    WORD    returned status (see below)
  353.  04h    DWORD    must be 0000h:0000h
  354.         on return, points to root tree
  355.  08h    DWORD    0000h:0000h
  356.  0Ch    WORD    unused under DOS
  357.  
  358. Format of request block for RegisterStatus:
  359. Offset    Size    Description
  360.  00h    WORD    0Ah
  361.  02h    WORD    returned status (0000h, 0008h, 002Ch) (see below)
  362.  04h    DWORD    0000h:0000h
  363.  08h    DWORD    pointer to 16-byte ASCIZ module name
  364.  0Ch    WORD    0000h
  365. Note:    not supported by the 10NET v5.0 PROTMAN$ driver
  366.  
  367. Values for status code:
  368.  0000h    success
  369.  0001h    wait for release--protocol has retained control of the data buffer
  370.  0002h    request queued
  371.  0003h    frame not recognized
  372.  0004h    frame rejected
  373.  0005h    frame should be forwarded
  374.  0006h    out of resource
  375.  0007h    invalid parameter
  376.  0008h    invalid function
  377.  0009h    not supported
  378.  000Ah    hardware error
  379.  000Bh    transmit error
  380.  000Ch    unrecognized destination
  381.  000Dh    buffer too small
  382.  0020h    already started
  383.  0021h    binding incomplete
  384.  0022h    driver not initialized
  385.  0023h    hardware not found
  386.  0024h    hardware failure
  387.  0025h    configuration failure
  388.  0026h    interrupt conflict
  389.  0027h    MAC incompatible
  390.  0028h    initialization failed
  391.  0029h    no binding
  392.  002Ah    network may be disconnected
  393.  002Bh    incompatible OS version
  394.  002Ch    already registered
  395.  002Dh    path not found
  396.  002Eh    insufficient memory
  397.  002Fh    info not found
  398.  00FFh    general failure
  399.  F000h-FFFFh reserved for vendor-specific codes, treated as general failure
  400.  
  401. Format of common characteristics table:
  402. Offset    Size    Description
  403.  00h    WORD    size of table in bytes
  404.  02h    BYTE    NDIS major version
  405.  03h    BYTE    NDIS minor version
  406.  04h    WORD    reserved
  407.  06h    BYTE    module major version
  408.  07h    BYTE    module minor version
  409.  08h    DWORD    module function flag bits
  410.         bit 0: binding at upper boundary supported
  411.         bit 1: binding at lower boundary supported
  412.         bit 2: dynamically bound
  413.         bits 3-31 reserved, must be 0
  414.  0Ch 16 BYTEs    ASCIZ module name
  415.  1Ch    BYTE    upper boundary protocol level (see below)
  416.  1Dh    BYTE    upper boundary interface type
  417.         for MACs: 1 = MAC
  418.         for data links and transports: to be defined
  419.         for session: 1 = NCB
  420.         any level: 0 = private (ISV-defined)
  421.  1Eh    BYTE    lower boundary protocol level (see below)
  422.  1Fh    BYTE    lower boundary interface type
  423.         same as offset 1Dh
  424.  20h    WORD    module ID filled in by protocol manager
  425.  22h    WORD    module DS
  426.  24h    DWORD    system request entry point
  427.  28h    DWORD    pointer to service-specific characteristics
  428.         0000h:0000h if none
  429.  2Ch    DWORD    pointer to service-specific status, or 0000h:0000h if none
  430.  30h    DWORD    pointer to upper dispatch table (see below)
  431.         0000h:0000h if none
  432.  34h    DWORD    pointer to lower dispatch table (see below)
  433.         0000h:0000h if none
  434.  38h  2 DWORDs    reserved, must be 0
  435. Note:    for compatibility with NDIS 1.x.x, a major version of 00h is
  436.       interpreted as 01h
  437.  
  438. Values for boundary protocol level:
  439.  00h    physical
  440.  01h    Media Access Control
  441.  02h    Data link
  442.  03h    network
  443.  04h    transport
  444.  05h    session
  445.  FFh    not specified
  446.  
  447. Format of MAC Service-Specific Characteristics Table:
  448. Offset    Size    Description
  449.  00h    WORD    length of table in bytes
  450.  02h 16 BYTEs    ASCIZ MAC type name, "802.3", "802.4", "802.5", "802.6", "DIX",
  451.         "DIX+802.3", "APPLETALK", "ARCNET", "FDDI", "SDLC", "BSC",
  452.         "HDLC", or "ISDN"
  453.  12h    WORD    length of station addresses in bytes
  454.  14h 16 BYTEs    permanent station address
  455.  24h 16 BYTEs    current station address
  456.  34h    DWORD    current functional adapter address (00000000h if none)
  457.  38h    DWORD    pointer to multicast address list
  458.  3Ch    DWORD    link speed in bits/sec
  459.  40h    DWORD    service flags (see below)
  460.  44h    WORD    maximum frame size which may be both sent and received
  461.  46h    DWORD    total transmit buffer capacity in bytes
  462.  4Ah    WORD    transmit buffer allocation block size in bytes
  463.  4Ch    DWORD    total receive buffer capacity in bytes
  464.  50h    WORD    receive buffer allocation block size in bytes
  465.  52h  3 BYTEs    IEEE vendor code
  466.  55h    BYTE    vendor adapter code
  467.  56h    DWORD    pointer to ASCIZ vendor adapter description
  468.  5Ah    WORD    IRQ used by adapter
  469.  5Ch    WORD    transmit queue depth
  470.  5Eh    WORD    maximum supported number of data blocks in buffer descriptors
  471.  60h  N BYTEs    vendor-specific info
  472.  
  473. Bitfields for service flags:
  474.  bit 0    supports broadcast
  475.  bit 1    supports multicast
  476.  bit 2    supports functional/group addressing
  477.  bit 3    supports promiscuous mode
  478.  bit 4    station address software settable
  479.  bit 5    statistics always current
  480.  bit 6    supports InitiateDiagnostics
  481.  bit 7    supports loopback
  482.  bit 8    MAC does primarily ReceiveChain indications instead of ReceiveLookahead
  483.     indications
  484.  bit 9    supports IBM source routing
  485.  bit 10 supports MAC reset
  486.  bit 11 supports Open/Close adapter
  487.  bit 12 supports interrupt request
  488.  bit 13 supports source routing bridge
  489.  bit 14 supports GDT virtual addresses (OS/2 version)
  490.  bit 15 multiple TransferDatas allowed durign a single indication
  491.  bit 16 MAC normally sets FrameSize = 0 in ReceiveLookahead
  492.  bit 17-31 reserved, must be 0
  493.  
  494. Format of NetBIOS Service-Specific Characteristics Table
  495. Offset    Size    Description
  496.  00h    WORD    length of table in bytes
  497.  02h 16 BYTEs    ASCIZ type name of NetBIOS module
  498.  12h    WORD    NetBIOS module code
  499.  14h  N BYTEs    vendor-specific info
  500.  
  501. Format of MAC Service-Specific Status Table:
  502. Offset    Size    Description
  503.  00h    WORD    length of table in bytes
  504.  02h    DWORD    seconds since 0:00 1/1/70 when diagnostics last run
  505.         (FFFFFFFFh = never)
  506.  06h    DWORD    MAC status bits (see below)
  507.  0Ah    WORD    current packet filter flags
  508.         bit 0: directed/multicast or group/functional
  509.         bit 1: broadcast
  510.         bit 2: promiscuous
  511.         bit 3: all source routing
  512.         bits 4-15: reserved, must be zero
  513.  0Ch    DWORD    pointer to media-specific status table or 0000h:0000h
  514.  10h    DWORD    seconds past 0:00 1/1/70 of last ClearStatistics
  515.  14h    DWORD    total frames received (FFFFFFFFh = not counted)
  516.  18h    DWORD    frames with CRC error (FFFFFFFFh = not counted)
  517.  1Ch    DWORD    total bytes received (FFFFFFFFh = not counted)
  518.  20h    DWORD    frames discarded--no buffer space (FFFFFFFFh = not counted)
  519.  24h    DWORD    multicast frames received (FFFFFFFFh = not counted)
  520.  28h    DWORD    broadcast frames received (FFFFFFFFh = not counted)
  521.  2Ch    DWORD    frames with errors (FFFFFFFFh = not counted)
  522.  30h    DWORD    overly large frames (FFFFFFFFh = not counted)
  523.  34h    DWORD    frames less than minimum size (FFFFFFFFh = not counted)
  524.  38h    DWORD    multicast bytes received (FFFFFFFFh = not counted)
  525.  3Ch    DWORD    broadcast bytes received (FFFFFFFFh = not counted)
  526.  40h    DWORD    frames discarded--hardware error (FFFFFFFFh = not counted)
  527.  44h    DWORD    total frames transmitted (FFFFFFFFh = not counted)
  528.  48h    DWORD    total bytes transmitted (FFFFFFFFh = not counted)
  529.  4Ch    DWORD    multicast frames transmitted (FFFFFFFFh = not counted)
  530.  50h    DWORD    broadcast frames transmitted (FFFFFFFFh = not counted)
  531.  54h    DWORD    broadcast bytes transmitted (FFFFFFFFh = not counted)
  532.  58h    DWORD    multicast bytes transmitted (FFFFFFFFh = not counted)
  533.  5Ch    DWORD    frames not transmitted--timeout (FFFFFFFFh = not counted)
  534.  60h    DWORD    frames not transmitted--hardware error (FFFFFFFFh = not countd)
  535.  64h  N BYTEs    vendor-specific info
  536.  
  537. Bitfields for MAC status bits:
  538.  bits 0-2    operational status
  539.         000 hardware not installed
  540.         001 hardware failed startup diagnostics
  541.         010 hardware configuration problem
  542.         011 hardware fault
  543.         100 operating marginally due to soft faults
  544.         101 reserved
  545.         110 reserved
  546.         111 hardware fully operational
  547.  bit 3    MAC bound
  548.  bit 4    MAC open
  549.  bit 5    diagnostics in progress
  550.  bits 6-31 reserved
  551. --------I-214402-----------------------------
  552. INT 21 U - IBM SYSTEM 36/38 WORKSTATION EMULATION - VDI.SYS - GET ???
  553.     AX = 4402h
  554.     BX = handle for character device "GDMS"
  555.     CX = number of bytes to read (>= 4)
  556.     DS:DX -> buffer (see below)
  557. Return: CF set on error
  558.         AX = error code (see AH=59h)
  559.     CF clear if successful
  560.         AX = number of bytes read
  561.  
  562. Format of returned data:
  563. Offset    Size    Description
  564.  00h  4 BYTEs    ???
  565.  04h    DWORD    pointer to ???
  566.  08h  4 BYTEs    ???
  567. --------m-214402-----------------------------
  568. INT 21 U - LASTBYTE.SYS v1.19 - IOCTL - GET ??? TABLE
  569.     AX = 4402h
  570.     BX = handle for device "LA$TBYTE"
  571.     CX = 0004h
  572.     DS:DX -> DWORD to hold address of 39-byte table of ???
  573. Return: CF set on error
  574.         AX = error code (see AH=59h)
  575.     CF clear if successful
  576.         AX = number of bytes read
  577. Program: LASTBYTE.SYS is part of the shareware "The Last Byte" memory
  578.       management package by Key Software Products
  579. SeeAlso: AX=4402h"HIGHUMM"
  580. --------m-214402-----------------------------
  581. INT 21 - HIGHUMM.SYS v1.17+ - IOCTL - GET API ADDRESS
  582.     AX = 4402h
  583.     BX = handle for device "KSP$UMM"
  584.     CX = 0004h
  585.     DS:DX -> DWORD to hold entry point
  586. Return: CF set on error
  587.         AX = error code (see AH=59h)
  588.     CF clear if successful
  589.         AX = number of bytes read
  590. Program: HIGHUMM.SYS is part of the shareware "The Last Byte" memory management
  591.       package by Key Software Products
  592. SeeAlso: AX=4402h"LASTBYTE"
  593.  
  594. Call HIGHUMM.SYS entry point with:
  595.     AH = 00h allocate UMB (same as XMS function 10h) (see INT 2F/AX=4310h)
  596.         DX = size in paragraphs
  597.         Return: BX = segment number (if successful)
  598.             DX = size of requested block/size of largest block
  599.     AH = 01h deallocate UMB (same as XMS func 11h) (see INT 2F/AX=4310h)
  600.         DX = segment number of UMB
  601.     AH = 02h request a bank-switched memory block
  602.         DX = size in paragraphs
  603.         Return: BX = segment number (if successful)
  604.             DX = size of requested block/size of largest block
  605.     AH = 03h release a bank-switched memory block
  606.         DX = segment number
  607.     AH = 04h transfer data to/from high memory
  608.         DS:SI -> source
  609.         ES:DI -> destination
  610.         CX = length in bytes
  611.         Note: enables bank-switched memory, does the copy, then disables
  612.         bank-switched memory
  613.     AH = 05h get a word from bank-switched memory
  614.         ES:DI -> word to read
  615.         Return: DX = word
  616.     AH = 06h put a word to bank-switched memory
  617.         ES:DI -> word to write
  618.         DX = word
  619.     AH = 07h put a byte to bank-switched memory
  620.         ES:DI -> byte to write
  621.         DL = byte
  622.     AH = 08h enable bank-switched memory
  623.         DS:SI -> 6-byte status save area
  624.     AH = 09h disable bank-switched memory
  625.         DS:SI -> 6-byte save area from enable call (AH=08h)
  626.     AH = 0Ah assign name to UMB or high bank-switched block
  627.         DX = segment number
  628.         DS:SI -> 8-byte blank-padded name
  629.     AH = 0Bh locate UMB block by name
  630.         DS:SI -> 8-byte blank-padded name
  631.         Return: BX = segment number (if successful)
  632.             DX = size of block
  633.     AH = 0Ch locate bank-switched block by name
  634.         DS:SI -> 8-byte blank-padded name
  635.         Return: BX = segment number (if successful)
  636.             DX = size of block
  637. Return: AX = status code
  638.         0001h successful
  639.         0000h failed
  640.         BL = error code
  641.             80h not implemented
  642.             B0h insufficient memory, smaller block available
  643.             B1h insufficient memory, no blocks available
  644.             B2h invalid segment number
  645. Note:    only functions 00h and 01h are always available; the remaining
  646.       functions are only enabled if the proper commandline switch is given
  647. --------c-214402-----------------------------
  648. INT 21 - SMARTDRV.SYS - IOCTL - GET CACHE STATUS
  649.     AX = 4402h
  650.     BX = file handle for device "SMARTAAR"
  651.     CX = number of bytes to read (min 28h)
  652.     DS:DX -> buffer for status record (see below)
  653. Return: CF clear if successful
  654.         AX = number of bytes actually read
  655.     CF set on error
  656.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  657. SeeAlso: AX=4403h"SMARTDRV",INT 2F/AX=4A10h/BX=0000h
  658.  
  659. Format of SMARTDRV status record:
  660. Offset    Size    Description
  661.  00h    BYTE    write-through flag (always 01h)
  662.  01h    BYTE    writes should be buffered (always 00h)
  663.  02h    BYTE    cache enabled if 01h
  664.  03h    BYTE    driver type (01h extended memory, 02h expanded)
  665.  04h    WORD    clock ticks between cache flushes (currently unused)
  666.  06h    BYTE    cache contains locked tracks if nonzero
  667.  07h    BYTE    flush cache on INT 19 reboot if nonzero
  668.  08h    BYTE    cache full track writes if nonzero
  669.  09h    BYTE    double buffering (for VDS) state (00h off, 01h on, 02h dynamic)
  670.  0Ah    DWORD    original INT 13 vector
  671.  0Eh    BYTE    minor version number
  672.  0Fh    BYTE    major version number
  673.  10h    WORD    unused
  674.  12h    WORD    sectors read            \
  675.  14h    WORD    sectors already in cache     > may be scaled rather than
  676.  16h    WORD    sectors already in track buffer /  absolute counts
  677.  18h    BYTE    cache hit rate in percent
  678.  19h    BYTE    track buffer hit rate in percent
  679.  1Ah    WORD    total tracks in cache
  680.  1Ch    WORD    number of tracks in use
  681.  1Eh    WORD    number of locked tracks
  682.  20h    WORD    number of dirty tracks
  683.  22h    WORD    current cache size in 16K pages
  684.  24h    WORD    original (maximum) cache size in 16K pages
  685.  26h    WORD    minimum cache size in 16K pages
  686.  28h    DWORD    pointer to byte flag to increment for locking cache contents
  687. --------d-214402-----------------------------
  688. INT 21 - CD-ROM device driver - IOCTL INPUT
  689.     AX = 4402h
  690.     BX = file handle referencing character device for CD-ROM driver
  691.     CX = number of bytes to read
  692.     DS:DX -> control block (see below)
  693. Return: CF clear if successful
  694.         AX = number of bytes actually read
  695.     CF set on error
  696.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  697. Note:    the data returned depends on the first byte of the control block; the
  698.       remainder of the control block is filled by the driver
  699. SeeAlso: AX=4403h"CD-ROM",INT 2F/AX=0802h
  700.  
  701. Values for data being requested:
  702.  00h    device driver header address
  703.  01h    drive head location
  704.  02h    reserved
  705.  03h    error statistics
  706.  04h    audio channel info
  707.  05h    raw drive bytes (uninterpreted and device-specific)
  708.  06h    device status
  709.  07h    sector size
  710.  08h    volume size
  711.  09h    media change status
  712.  0Ah    audio disk info
  713.  0Bh    audio track info
  714.  0Ch    audio Q-Channel info
  715.  0Dh    audio sub-channel info
  716.  0Eh    UPC code
  717.  
  718. Format of control block:
  719. Offset    Size    Description
  720.  00h    BYTE    data being requested (see above)
  721. ---function 00h---
  722.  01h    DWORD    device driver header address (see also AH=52h)
  723. ---function 01h---
  724.  01h    BYTE    addressing mode
  725.         00h HSG
  726.         01h Red Book
  727.  02h    DWORD    current location of drive's head
  728.         logical sector number in HSG mode
  729.         frame/second/minute/unused in Red Book mode
  730.         (HSG sector = minute * 4500 + second * 75 + frame - 150)
  731. ---function 03h---
  732.  01h  N BYTEs    undefined as of 5 Aug 88 specification
  733. ---function 04h---
  734.  01h    BYTE    input channel (0-3) for output channel 0
  735.  02h    BYTE    volume for output channel 0
  736.  03h    BYTE    input channel (0-3) for output channel 1
  737.  04h    BYTE    volume for output channel 1
  738.  05h    BYTE    input channel (0-3) for output channel 2
  739.  06h    BYTE    volume for output channel 2
  740.  07h    BYTE    input channel (0-3) for output channel 3
  741.  08h    BYTE    volume for output channel 3
  742. Notes:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  743.       right prime; a volume of 00h is off
  744.     the default setting is for each input channel to be assigned to the
  745.       same-numbered output channel at full (FFh) volume
  746. ---function 05h---
  747.  01h    BYTE    number of bytes read
  748.  02h 128 BYTEs    buffer for drive bytes
  749. ---function 06h---
  750.  01h    DWORD    device parameters (see below)
  751. ---function 07h---
  752.  01h    BYTE    read mode
  753.         00h cooked
  754.         01h raw
  755.  02h    WORD    sector size in bytes
  756. ---function 08h---
  757.  01h    DWORD    volume size in sectors
  758. ---function 09h---
  759.  01h    BYTE    media change status
  760.         00h don't know
  761.         01h media unchanged
  762.         FFh media has been changed
  763. ---function 0Ah---
  764.  01h    BYTE    lowest audio track number
  765.  02h    BYTE    highest audio track number
  766.  03h    DWORD    start address of lead-out track (Red Book format)
  767. --function 0Bh---
  768.  01h    BYTE    track number (set by caller)
  769.  02h    DWORD    starting point of track (Red Book format)
  770.  06h    BYTE    track control info
  771.         bits 15,14,12: track type (notice: bits not contiguous!)
  772.             000 two audio channels, no pre-emphasis
  773.             001 two audio channels with pre-emphasis
  774.             010 data track
  775.             100 four audio channels, no pre-emphasis
  776.             101 four audio channels with pre-emphasis
  777.             other reserved
  778.         bit 13: digital copy permitted
  779. ---function 0Ch---
  780.  01h    BYTE    CONTROL and ADR byte (as received from drive)
  781.  02h    BYTE    track number
  782.  03h    BYTE    point or index
  783.  04h    BYTE    minute    \
  784.  05h    BYTE    second     > running time within track
  785.  06h    BYTE    frame    /
  786.  07h    BYTE    zero
  787.  08h    BYTE    "AMIN" or "PMIN"     \
  788.  09h    BYTE    "ASEC" or "PSEC"      > running time on disk
  789.  0Ah    BYTE    "AFRAME" or "PFRAME" /
  790. ---function 0Dh---
  791.  01h    DWORD    starting frame address (Red Book format)
  792.  05h    DWORD    transfer address
  793.  09h    DWORD    number of sectors to read
  794. Note:    copies 96 bytes of sub-channel info per sector into buffer
  795. ---function 0Eh---
  796.  01h    BYTE    CONTROL and ADR byte
  797.  02h  7 BYTEs    UPC/EAN code (13 BCD digits,low-order nybble of last byte is 0)
  798.  09h    BYTE    zero
  799.  0Ah    BYTE    "AFRAME"
  800.  
  801. Bitfields for device parameters:
  802.  bit 0    door open
  803.  bit 1    door unlocked
  804.  bit 2    supports raw reading in addition to cooked
  805.  bit 3    writable
  806.  bit 4    can play audio/video tracks
  807.  bit 5    supports interleaving
  808.  bit 6    reserved
  809.  bit 7    supports prefetch requests
  810.  bit 8    supports audio channel control
  811.  bit 9    supports Red Book addressing in addition to HSG
  812.  bit 10 audio is playing
  813. --------m-214402-----------------------------
  814. INT 21 - Quarterdeck - QEMM-386 v5+ - GET API ENTRY POINT
  815.     AX = 4402h
  816.     BX = file handle for device "QEMM386$"
  817.     CX = 0004h
  818.     DS:DX -> DWORD buffer for API entry point
  819. Return: CF clear if successful
  820.         buffer filled (see INT 67/AH=3Fh for entry point parameters)
  821.     CF set on error
  822.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  823. Note:    Quarterdeck recently (June 1993) documented this function, but the
  824.       documentation incorrectly states that it is only available for
  825.       QEMM 6+
  826. SeeAlso: AX=4402h"HOOKROM",INT 2F/AX=D201h/BX=5145h,INT 67/AH=3Fh
  827. --------Q-214402-----------------------------
  828. INT 21 U - Quarterdeck - HOOKROM.SYS - GET HOOKED VECTOR TABLE
  829.     AX = 4402h
  830.     BX = file handle for device "HOOKROM$"
  831.     CX = 0004h
  832.     DS:DX -> DWORD buffer for address of hooked vector table (see below)
  833. Return: CF clear if successful
  834.         DS:DX buffer filled
  835.     CF set on error
  836.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  837. SeeAlso: AX=4402h/SF=01h
  838.  
  839. Format of hooked vector table entry:
  840. Offset    Size    Description
  841.  00h  5 BYTEs    FAR jump to actual interrupt handler
  842.         (end of table if first byte is not EAh)
  843.  05h    BYTE    interrupt vector number
  844. --------d-214402-----------------------------
  845. INT 21 - Advanced SCSI Programming Interface (ASPI) - INTERFACE
  846.     AX = 4402h
  847.     BX = file handle for device "SCSIMGR$"
  848.     CX = 0004h
  849.     DS:DX -> buffer for function address
  850. Return: CF clear if successful
  851.         AX = 0004h
  852.     CF set on error
  853.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  854. Note:    the function address is called with the address of a SCSI Request
  855.       Block on the stack and the caller must clean up the stack
  856. SeeAlso: AX=440Ch"ASPITAPE",INT 11/AH=FFh"WD7000"
  857.  
  858. Format of SCSI Request Block (64 bytes):
  859. Offset    Size    Description
  860.  00h    BYTE    request number
  861.         00h "HA_INQ"     host adapter inquiry
  862.         01h "GET_TYPE"     get device type
  863.         02h "EXEC_SIO"     execute SCSI I/O
  864.         03h "ABORT_SRB"     abort SRB
  865.         04h "RESET_DEV"     reset SCSI device
  866.         05h "SET_HAPRMS" set host adapter parameters
  867.  01h    BYTE    request status
  868.         00h not done yet
  869.         02h aborted
  870.         04h SCSI I/O error
  871.         80h invalid
  872.         81h no adapter
  873.         82h no device attached
  874.         else status
  875.  02h    BYTE    host adapter ID
  876.  03h    BYTE    request flags
  877.         bit 3: ???
  878.  04h    DWORD    reserved
  879. ---request 00h---
  880.  08h    BYTE    (returned) number of host adapters
  881.  09h    BYTE    (returned) target adapter ID
  882.  0Ah 16 BYTEs    (returned) manager ID
  883.  1Ah 16 BYTEs    (returned) adapter ID
  884.  2Ah 16 BYTEs    (returned) parameters
  885. ---request 01h---
  886.  08h    BYTE    target ID
  887.  09h    BYTE    logical unit number
  888.  0Ah    BYTE    (returned) device type
  889.         01h streamer
  890. ---request 02h---
  891.  08h    BYTE    target ID
  892.  09h    BYTE    logical unit number
  893.  0Ah    DWORD    data allocation length
  894.  0Eh    BYTE    sense allocation length
  895.  0Fh    DWORD    data buffer pointer
  896.  13h    DWORD    next request pointer (for linking)
  897.  17h    BYTE    CDB length
  898.  18h    BYTE    (returned) host adapter status
  899.         11h select timeout
  900.         12h data overrun
  901.         13h bus error
  902.         14h bus failure
  903.  19h    BYTE    (returned) target status
  904.         02h sense data stored in SRB
  905.         08h target busy
  906.         18h reservation error
  907.  1Ah    DWORD    post routine address
  908.  1Eh    WORD    real mode Post DS
  909.  20h    DWORD    SRB pointer
  910.  24h    WORD    reserved
  911.  26h    DWORD    SRB physical address
  912.  2Ah 22 BYTEs    SCSIMGR$ workspace
  913.  40h  N BYTEs    CCB (20-24 bytes)
  914. ---request 04h---
  915.  08h    BYTE    target ID
  916.  09h    BYTE    logical unit number
  917.  0Ah 14 BYTEs    reserved
  918.  18h    BYTE    (returned) host adapter status (see above)
  919.  19h    BYTE    (returned) target status (see above)
  920.  1Ah    DWORD    post routine address
  921.  1Eh 34 BYTEs    workspace
  922.  
  923. Format of CCB:
  924. Offset    Size    Description
  925.  00h    BYTE    command code
  926.         01h rewind
  927.         05h get block size limits
  928.         08h read
  929.         0Ah write
  930.         10h write file marks
  931.         11h SCSI Space (set position?)
  932.         12h SCSI Inquire
  933.         19h erase
  934.         1Bh load/unload media
  935.  01h    BYTE    flags
  936.         bits 4-0: vary by function
  937.         bits 7-5: logical unit number
  938.  02h    BYTE    "adr_1"
  939.  03h    BYTE    "adr_0"
  940.  04h    BYTE    length
  941.  05h    BYTE    control
  942.     ...
  943.  06h/0Ah 14 BYTEs buffer for sense data
  944. --------m-214402-----------------------------
  945. INT 21 U - Qualitas 386MAX v6.00+ - IOCTL INPUT - GET STATE
  946.     AX = 4402h
  947.     BX = file handle for device "386MAX$$"
  948.     CX = number of bytes to read
  949.     DS:DX -> BYTE 03h followed by 386MAX state buffer (see below)
  950. Return: CF clear if successful
  951.         buffer at DS:DX+1 filled
  952.         AX = number of bytes actually copied
  953.     CF set on error
  954.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  955. Notes:    if the value given in CX is less than the size of the state record
  956.       (5Ah for v6.01, 66h for v7.00), only a partial state record will be
  957.       returned
  958.     the state is 40h bytes for 386MAX (actually ASTEMM) v2.20 ("386MAX$$"
  959.       did not exist yet, use "QMMXXXX0" and then "EMMXXXX0" instead) and
  960.       56h bytes for v5.11.
  961.     to invoke 386MAX API functions, push DX onto the stack, load DX with
  962.       the word at offset 25h in the returned state, load all other
  963.       registers as needed for the desired function, and execute an
  964.       OUT DX,AL or OUT DX,AX; DX will be set to the pushed value on return
  965.       if it is not otherwise modified by the API function.    For safety,
  966.       in case a function is not supported or 386MAX is not present, SP
  967.       should be saved and restored around the API call.
  968.     Windows 3.1 Standard mode, LAN Manager, and Windows for Workgroups all
  969.       use the 386MAX API; LAN Manager and Windows for Workgroups reportedly
  970.       make some calls incorrectly
  971. SeeAlso: AX=4403h/SF=03h"386MAX",INT 67/AH=3Fh
  972.  
  973. Format of 386MAX v6.01+ state:
  974. Offset    Size    Description
  975.  -1    BYTE    (call) 03h
  976.  00h  6 BYTEs    signature "386MAX"
  977.  06h  4 BYTEs    version string "N;NN" (i.e. "6;01" for v6.01)
  978.  0Ah    WORD    segment of low-memory portion of 386MAX.SYS
  979.  0Ch  2 BYTEs    ???
  980.  0Eh    WORD    segment of ??? memory block or 0000h
  981.  10h    WORD    bit flags 1 (see below)
  982.  12h    WORD    (v6.01) starting address of video memory in KB
  983.         (v7.00) low memory size in bytes
  984.  14h  2 BYTEs    ???
  985.  16h    WORD    total high DOS memory in KB
  986.  18h  2 BYTEs    ???
  987.  1Ah    WORD    available shared memory in KB
  988.  1Ch    WORD    KBytes extended memory used by 386MAX
  989.  1Eh  2 BYTEs    ???
  990.  20h    WORD    total extended memory in KB
  991.  22h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX INT 15 functions
  992.  24h    WORD    IO port to write (OUT DX,AL) to invoke 386MAX API functions
  993.  26h    WORD    ??? (depends on DOS version)
  994.  28h  2 BYTEs    ???
  995.  2Ah    DWORD    machine type (see below)
  996.  2Eh    WORD    ???
  997.  30h    WORD    ???
  998.  32h    WORD    system configuration flags (see below)
  999.  34h    WORD    debugging flags 1 (see below)
  1000.  36h    WORD    debugging flags 2 (see below)
  1001.  38h  2 BYTEs    ???
  1002.  3Ah    WORD    segment of first MCB in high memory chain???
  1003.  3Ch    WORD    feature flags 1 (see below)
  1004.  3Eh    WORD    feature flags 2 (see below)
  1005.  40h    WORD    feature flags 3 (see below)
  1006.  42h    WORD    segment of first 386MAX control block??? (see below)
  1007.  44h    WORD    amount of memory to report available on INT 15/AH=88h
  1008.  46h  4 BYTEs    ???
  1009.  4Ah    WORD    number of K at start of address space swapped with fast
  1010.         extended memory (SWAP= parameter)
  1011.  4Ch  2 BYTEs    ???
  1012.  4Eh    WORD    ???
  1013.  50h    WORD    debugging flags 3 (see below)
  1014.  52h    DWORD    old INT 21h
  1015.  56h    DWORD    pointer to 386MAX's EMS (INT 67h) handler
  1016. ---386MAX v7.00---
  1017.  5Ah    DWORD    KB of extended memory managed by 386MAX
  1018.  5Eh    DWORD    bytes of extended memory (EXT= parameter)
  1019.  62h  4 BYTEs    ???
  1020.  
  1021. Bitfields for bit flags 1:
  1022.  bit 1    ???
  1023.  bit 2    ???
  1024.  bit 3    ??? (cleared by calling INT 67 functions)
  1025.  bit 4    high RAM present???
  1026.  bit 5    386MAX in AUTO mode
  1027.  bit 6    386MAX enabled
  1028.  bit 7    386MAX is providing EMS services
  1029.  bit 8    ???
  1030.  bit 9    A20 enabled??? (see INT 15/AX=2402h)
  1031.  bit 10    Weitek support enabled
  1032.  bit 11    ???
  1033.  bit 12    ???
  1034.  bit 13    QPMS has been used
  1035.  bit 14    ???
  1036.  bit 15    ???
  1037.  
  1038. Bitfields for system configuration flags:
  1039.  bit 1    ROM compressed???
  1040.  bit 3    ???
  1041.  bit 5    386MAX loaded into high memory
  1042.  bit 6    Microchannel bus
  1043.  bit 7    Weitek math coprocessor detected
  1044.  bit 11    PC/XT (thus only single 8259 interrupt controller present, DMA only
  1045.         in 1st megabyte, etc)
  1046.  bit 13    LMLTOP= specified
  1047.  bit 15    ???
  1048.  
  1049. Bitfields for debugging flags 1:
  1050.  bit 0    DEBUG=LED
  1051.  bit 1    DEBUG=X67
  1052.  bit 2    DEBUG=INV
  1053.  bit 3    DEBUG=EMSPTED
  1054.  bit 4    DEBUG=JMP
  1055.  bit 5    DEBUG=CALL
  1056.  bit 6    DEBUG=HLT
  1057.  bit 7    DEBUG=PMR
  1058.  bit 8    DEBUG=CR3
  1059.  bit 9    DEBUG=CAPS or DEBUG=INT
  1060.  bit 10    DEBUG=RC
  1061.  bit 11    DEBUG=ROM
  1062.  bit 12    DEBUG=XM
  1063.  bit 13    DEBUG=SOR
  1064.  bit 14    DEBUG=XR
  1065.  bit 15    DEBUG=EMSERR
  1066.  
  1067. Bitfields for debugging flags 2:
  1068.  bit 0    DEBUG=ROMSWAP
  1069.  bit 1    DEBUG=UNSHADOWROM
  1070.  bit 2    DEBUG=COMPROM
  1071.  bit 3    DEBUG=DPMIPHYS
  1072.  bit 4    DEBUG=ALLROM
  1073.  bit 5    DEBUG=VMS
  1074.  bit 6    DEBUG=XMS
  1075.  bit 7    DEBUG=I06
  1076.  bit 8    DEBUG=VCPI
  1077.  bit 9    DEBUG=XDMA
  1078.  bit 10    DEBUG=X09
  1079.  bit 13    DEBUG=I67
  1080.  bit 14    DEBUG=EVM
  1081.  bit 15 DEBUG=EMSSAVE or DEBUG=VDS
  1082.  
  1083. Bitfields for debugging flags 3:
  1084.  bit 10    DEBUG=EPM
  1085.  bit 12    DEBUG=ABIOS
  1086.  bit 13    DEBUG=XMSPTED
  1087.  bit 14    DEBUG=TIME
  1088.  bit 15    DEBUG=SCRUB
  1089.  
  1090. Bitfields for feature flags 1:
  1091.  bit 1    Weitek present
  1092.  bit 2    no DPMI services
  1093.  bit 3    NODMA
  1094.  bit 4    TERSE
  1095.  bit 5    NOROM
  1096.  bit 6    NOPARITY
  1097.  bit 8    NOFLEX (IGNOREFLEXFRAME)
  1098.  bit 11    don't create UMBs
  1099.  bit 12    don't backfill below video memory (NOLOW)
  1100.  bit 13    FRAME= specified
  1101.  bit 14    EXT= specified
  1102.  bit 15    NOEMS, allow prior expanded memory manager to provide EMS
  1103.  
  1104. Bitfields for feature flags 2:
  1105.  bit 0    UNSHIFT specified (FORCEA20 disabled)
  1106.  bit 1    NOXRAM
  1107.  bit 2    NOSCSI specified
  1108.  bit 3    SCREEN specified
  1109.  bit 4    enabled EISADMA
  1110.  bit 5    slow DMA
  1111.  bit 6    RESETKEYB specified
  1112.  bit 7    ???
  1113.  bit 9    TOP384
  1114.  bit 11    NOWARMBOOT
  1115.  bit 12    USE= specified
  1116.  bit 13    ROM= specified
  1117.  
  1118. Bitfields for feature flags 3:
  1119.  bit 0    Windows3 support enabled
  1120.  bit 1    SHADOWROM
  1121.  bit 2    don't compress ROM (NOCOMPROM)
  1122.  bit 3    ??? (related to PRGREG=)
  1123.  bit 4    ??? (related to PRGREG=)
  1124.  bit 5    SHADOWRAM
  1125.  bit 6    DOS4 specified
  1126.  bit 7    NOLOADHIGH
  1127.  bit 8    NOPULSE
  1128.  bit 11    FORCEA20
  1129.  bit 12    DMA buffer enabled
  1130.  bit 13 NOSCRUB
  1131.  bit 15    NOFRAME
  1132.  
  1133. Bitfields for machine type:
  1134.  bit 12 Amstrad
  1135.  bit 13 Epson
  1136.  bit 14 Zenith Data Systems
  1137.  bit 15    "ASEM"
  1138.  bit 16 NEC
  1139.  bit 17    "HPRS" model codes 69h and 6Ah
  1140.  bit 18 Dell
  1141.  bit 19    "CA"
  1142.  bit 20    ITT (Xtra Business Systems/Alcatel)
  1143.  bit 21    Toshiba 5100
  1144.  bit 22    Olivetti
  1145.  bit 23    Quadram Quad386 (BIOS model FEh, submodel A6h)
  1146.  bit 24    Tandy???
  1147.  bit 25    AST 386
  1148.  bit 26    INBOARD, ??? version
  1149.  bit 27    INBOARD, ??? version
  1150.  bit 28    INBOARD, ??? version
  1151.  bit 29    "HPRS"
  1152.  bit 30    Compaq 386
  1153.  bit 31    JET386
  1154.  
  1155. Format of 386MAX control block:
  1156. Offset    Size    Description
  1157.  00h    WORD    segment of next block (FFFFh if last)
  1158.  02h    WORD    segment of previous block (FFFFh if first)
  1159.  04h 12 BYTEs    filename
  1160.  10h    WORD    resident size in paragraphs
  1161.  12h    WORD    environment size???
  1162.  14h    WORD    real prsent environment size + 1 (0000h if ENVSAVE used)
  1163.  16h  2 BYTEs    ???
  1164.  18h    DWORD    initial size or SIZE=n in 386LOAD commandline
  1165.  1Ch    DWORD    SIZE=-1 ???
  1166.  20h    DWORD    SIZE= ???
  1167.  24h    BYTE    PRGREG= if specified, else FFh
  1168.  25h    BYTE    ENVREG= if specified, else FFh
  1169.  26h    BYTE    FlexFrame (00h not present, 01h present)
  1170.  27h  3 BYTEs    ???
  1171.  2Ah    BYTE    GROUP= or 00h if not present
  1172.  2Bh    BYTE    ???
  1173.  2Ch    WORD    PSP
  1174.  
  1175. Format of high memory info record:
  1176. Offset    Size    Description
  1177.  00h    WORD    segment address of memory region
  1178.  02h    WORD    size of memory region in paragraphs
  1179.  04h    BYTE    type or flags???
  1180.         00h if locked out
  1181.         02h if EMS page frame
  1182.         04h if high RAM
  1183.         42h if ROM
  1184.  05h    BYTE    ???
  1185.  
  1186. Format of ROM shadowing record:
  1187. Offset    Size    Description
  1188.  00h    WORD    segment of ROM???
  1189.  02h    WORD    segment of ROM???
  1190.  04h  2 BYTEs    ???
  1191.  06h    WORD    size of shadowed ROM in paragraphs
  1192.  08h  4 BYTEs    ???
  1193.  
  1194. Values for memory type:
  1195.  00h    unused by EMS
  1196.  01h    DOS
  1197.  04h    page frame overlapping ROM???
  1198.  80h    high memory
  1199.  84h    page frame???
  1200.  87h    video ROM???
  1201. Note:    the type may be 00h (unused) if the 16K page is split among different
  1202.       uses (such as ROM and high RAM)
  1203.  
  1204. Call 386MAX API (via OUT DX,AL) with:
  1205.     STACK: WORD value for DX
  1206.     AH = 01h get high memory information
  1207.         ES:DI -> buffer for array of high memory info records
  1208.             (see above)
  1209.         Return: CX = number of records placed in buffer
  1210.     AH = 02h get shadowed ROM info???
  1211.         ES:DI -> buffer for array of ROM shadowing records (see above)
  1212.         Return: CX = number of records placed in buffer
  1213.     AH = 03h get 386MAX state
  1214.         ES:DI -> 90-byte buffer for state (see above)
  1215.         Return: AH = 00h (successful)
  1216.             buffer filled
  1217.         Note:    unlike INT 21/AX=4402h"386MAX", this function omits
  1218.               the first byte specifying the state buffer version
  1219.     AH = 04h get memory types???
  1220.         ES:DI -> buffer for memory type info (array of bytes, one per
  1221.             16K page) (see above)
  1222.         Return:    CX = number of bytes placed in buffer
  1223.     AH = 05h get ???
  1224.         AL = A20 control (00h enable A20 first, 01h leave unchanged)
  1225.         CX = number of 4K pages to report (0000h for default)
  1226.         SI = first K to report (rounded down to 4K page)
  1227.         ES:DI -> buffer for returned info on ???
  1228.         Return: CX = number of 4K pages reported on
  1229.             ???
  1230.     AH = 06h get memory speed info
  1231.         ES:DI -> buffer for memory speed records (see below)
  1232.         Return: AH = 00h (successful)
  1233.             CX = number of bytes placed in buffer
  1234.         Note:    this function can take over a second to execute
  1235.     AH = 07h ???
  1236.         DX = EMS handle (on stack)
  1237.         ???
  1238.         Return:    ???
  1239.     AH = 08h "EMM2_GOREAL" check whether possible to disable 386MAX
  1240.         AL = ??? (00h or nonzero)
  1241.         Return: AH = status (00h OK, A4h not possible at this time)
  1242.         Note:    if AL=00h, this function always returns success
  1243.     AH = 09h toggle ??? flags
  1244.         BX = bitmask of bits of ??? flags (word at state+10h) to toggle
  1245.         Return: AH = 00h (successful)
  1246.         Note:    enables A20 first
  1247.     AH = 0Ah toggle ??? flags
  1248.         BX = bitmask of bits of ??? (word at state+32h) to toggle
  1249.         Return: AH = 00h (successful)
  1250.         Notes:    enabled A20 first
  1251.             does ??? if bit 3 on after specified bits are toggled
  1252.     AH = 0Bh toggle ??? flags
  1253.         BX = bitmask of bits of ??? (word at state+34h) to toggle
  1254.         Return: AH = 00h (successful)
  1255.         Note:    enables A20 first
  1256.     AH = 0Ch toggle ??? flags
  1257.         BX = bitmask of bits of ??? (word at state+40h) to toggle
  1258.         Return: AH = 00h (successful)
  1259.         Note:    enables A20 first
  1260.     AH = 0Dh specify 386MAX high-memory location
  1261.         BX = segment address of high-memory real-mode portion of 386MAX
  1262.         CX = current segment of real-mode stub???
  1263.         Return: AH = status (00h successful)
  1264.             ???
  1265.     AH = 0Eh CRT controller register virtualization
  1266.         AL = subfunction
  1267.             00h allow access to CRTC I/O ports 03B4h/03B5h, 03D4h/03D5h
  1268.             01h trap accesses to CRTC I/O ports
  1269.     AH = 0Fh reboot system
  1270.         Return: never
  1271.     AH = 11h get high memory information
  1272.         ES:DI -> 96-byte buffer for high memory info
  1273.         Return: AH = 00h (successful)
  1274.             ES:DI buffer filled
  1275.         Notes:    each byte in buffer contains bit flags for a 4K page in
  1276.               the A000h-FFFFh region
  1277.                 bit 0: ???
  1278.                 bit 1: physical address same as linear address
  1279.                 bit 2: EMS page frame
  1280.                 bit 6: ???
  1281.             this function can take over a second to execute,
  1282.               because it also tests the memory
  1283.     AH = 12h ???
  1284.         AL = subfunction
  1285.             00h ???
  1286.             01h ???
  1287.         ???
  1288.         Return: AH = 00h (successful) if AL=00h or 01h
  1289.             AH = 8Fh otherwise
  1290.     AH = 13h page protection???
  1291.         AL = subfunction
  1292.             00h set all ??? 4K pages to read-only???
  1293.             01h set all ??? 4K pages to read-write???
  1294.         ???
  1295.         Return: AH = 00h (successful) if AL=00h or 01h
  1296.             AH = 8Fh otherwise
  1297.     AH = 14h ???
  1298.         ES:DI -> 54-byte buffer for ???
  1299.         Return: AH = 00h if successful
  1300.             AH = A4h on error
  1301.     AH = 15h ???
  1302.         ???
  1303.         Return: ???
  1304.     AH = 16h get 386MAX memory usage screen
  1305.         ES:DI -> buffer for memory info display
  1306.         CX = size of buffer in bytes
  1307.         Return:    ES:DI buffer filled with '$'-terminated string (if
  1308.                 large enough to hold entire usage screen)
  1309.         Note:    the screen is 0303h bytes in v7.00
  1310.     AH = 17h Windows 3 startup/termination
  1311.         AL = subfunction
  1312.             00h Windows3 initializing
  1313.             DX (on stack) = Windows startup flags
  1314.             DI = Windows version number (major in upper byte)
  1315.             ES:BX = 0000h:0000h
  1316.             DS:SI = 0000h:0000h
  1317.             Return: CX = 0000h if OK for Windows to load
  1318.                    <> 0 if Windows should not load
  1319.                 ES:BX -> startup info structure
  1320.                 DS:SI -> Virtual86 mode enable/disable callback
  1321.             01h Windows3 terminating
  1322.             ES:BX -> ???
  1323.             DX (on stack) = Windows exit flags
  1324.             Return: ???
  1325.     AH = 18h QPMS (Qualitas Protected Memory Services)
  1326.         AL = subfunction
  1327.             00h get QPMS configuration
  1328.             Return: BX = starting segment of QPMS memory window
  1329.                 CX = number of 4K pages reserved for QPMS???
  1330.                 DX = number of 4K pages in QPMS window???
  1331.             01h map QPMS memory page???
  1332.             BX = 4K page number within memory reserved for QPMS???
  1333.             CL = 4K page number within QPMS memory window???
  1334.             02h mark all QPMS memory read-only
  1335.             03h mark all QPMS memory read-write
  1336.         Return: AH = status (00h,8Ah,8Bh,8Fh)
  1337.     AH = 19h get linear address for physical address
  1338.         EDX = physical address (low word on stack)
  1339.         Return: AH = status
  1340.                 00h successful
  1341.                 EDX = linear address at which physical address
  1342.                     may be accessed
  1343.                 8Bh physical address currently not addressable
  1344.         Note:    enables A20 first
  1345.     AH = 1Ah set page table entry???
  1346.         EDX = new page table entry??? (low word on stack)
  1347.         ESI = linear address of page???
  1348.         Return: AH = status (00h,8Bh)
  1349.         Note:    enables A20 first
  1350.     AH = 1Bh get ???
  1351.         Return: AH = status
  1352.             BX = ???
  1353.             CX = ???
  1354.             EDX = physical address of ???
  1355.     AH = 1Ch get original interrupt vector
  1356.         AL = interrupt vector (00h-7Fh)
  1357.         Return: AH = 00h (successful)
  1358.             EDX = original vector before 386MAX loaded (segment in
  1359.                 high word, offset in low word)
  1360.         Note:    no range checking is performed; requests for INTs 80h-
  1361.               FFh will return random values
  1362.     AH = 1Dh display string???
  1363.         SI = ???
  1364.         Return: AH = 00h (successful)
  1365.             ???
  1366.     AH = 1Eh get memory info
  1367.         ES:DI -> memory info (see below)
  1368.         Return: ???
  1369.     AH = 1Fh get DPMI host information
  1370.         Return: AX = 0000h if successful
  1371.             BX = DPMI flags (see INT 31/AX=0400h)
  1372.             CL = CPU type (02h = 80286, 03h = 80386, etc.)
  1373.             DX = DPMI ver supported (DH=major, DL=2-digit minor)
  1374.             SI = ???
  1375.             ES???:DI -> ???
  1376.         Note:    NOP if NODPMI switch specified
  1377.     AH = 20h (v7.00) ???
  1378.         AL = ???
  1379.         Return: EDX = ??? for ??? AL
  1380.     AH = 21h (v7.00) STACKS support
  1381.         AL = 00h get STACKS parameters
  1382.         Return: BX = ???
  1383.             CX = number of stacks for hardware interrupts
  1384.             DX = size of each stack in bytes
  1385.             SI = ???
  1386.             DI = ???
  1387.         AL = 01h set ??? "EMM2_DSTKS"
  1388.         EBX = ???
  1389.         ECX = ???
  1390.         DS = ???
  1391.         AL = 02h ???
  1392.         BL = ??? (00h-03h)
  1393.         ???
  1394.     AH = 22h (v7.00)
  1395.         AL = 00h ???
  1396.         AL = nonzero ???
  1397.         ???
  1398.     AH = 23h (v7.00) ???
  1399.         AL = 00h set ???
  1400.         ???
  1401.         AL = 01h ???
  1402.         ???
  1403.         AL = 02h get ???
  1404.         CX = size of buffer
  1405.         ES:DI -> buffer for ???
  1406.         Return: CX = number of bytes actually returned
  1407.         AL = 03h set ???
  1408.         ES:DI -> buffer containing ASCIZ ???
  1409.         AL = 04h get ???
  1410.         ES:DI -> buffer for ASCIZ ???
  1411.     AH = 24h (v7.00) ???
  1412.         AL = 00h get ???
  1413.         Return: BX = current state of ??? (0/1)
  1414.         AL = 01h set ???
  1415.         BX = new state of ??? (0/1)
  1416.         AL = other ???
  1417.     AH = 25h (v7.00) ???
  1418.     AH = 26h (v7.00) ???
  1419.         Return: BX = ???
  1420.             CX = ???
  1421.     AH = 27h (v7.00) ???
  1422.         AL = 00h get ???
  1423.         Return: BX = ???
  1424.         AL = 01h ???
  1425.         BX = ???
  1426.         ES??? = ???
  1427.         AL = 02h ???
  1428.         ???
  1429.         AL = 03h ???
  1430.         CX = ???
  1431.         DX = ???
  1432.         ES??? = ???
  1433.         Return: ???
  1434.     AH = 28h (v7.00) get ???
  1435.         Return: CX = ???
  1436.             DX = ???
  1437.     AH = 29h (v7.00) get ???
  1438.         Return: AX = ???
  1439.     AH = 40h-5Dh EMS services (see INT 67/AH=40h etc)
  1440.     AH = DEh VCPI services (see INT 67/AX=DE00h etc)
  1441. Return: AH = status (as for EMS INT 67 calls)
  1442.         00h successful
  1443.         80h internal error
  1444.         81h hardware malfunction
  1445.         83h invalid handle
  1446.         84h    undefined function
  1447.         8Ah invalid logical page nuber
  1448.         8Bh illegal physical page number
  1449.         8Fh undefined subfunction
  1450.         A4h access denied
  1451.         etc.
  1452.     STACK popped (value placed in DX if no specific return value for DX)
  1453.  
  1454. Format of memory speed record:
  1455. Offset    Size    Description
  1456.  00h    DWORD    page table entry for 4K page
  1457.  04h    WORD    number of microticks (840ns units) required for REP LODSD of
  1458.         entire 4K page
  1459.  
  1460. Format of memory info [array]:
  1461. Offset    Size    Description
  1462.  00h    DWORD    ???
  1463.  04h    DWORD    ???
  1464.  08h  2 BYTEs    ???
  1465.  0Ah    BYTE    type??? (03h = conventional???)
  1466.  0Bh    BYTE    ???
  1467. --------V-214402-----------------------------
  1468. INT 21 - PGS1600.DEV - IOCTL - GET CONFIGURATION INFO
  1469.     AX = 4402h
  1470.     BX = file handle for device "PGS1600$"
  1471.     CX = 0018h (size of buffer)
  1472.     DS:DX -> configuration buffer (see below)
  1473. Return: CF clear if successful
  1474.         buffer filled
  1475.         AX = number of bytes actually copied
  1476.     CF set on error
  1477.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1478. Program: PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  1479.       display adapter, which provides a 1600x1200 monochrome display as
  1480.       well as one of two emulations, MDA or CGA.
  1481. SeeAlso: AX=4403h"PGS1600"
  1482.  
  1483. Format of configuration information:
  1484. Offset    Size    Description
  1485.  00h    WORD    version (high byte = major, low byte = minor)
  1486.  02h    WORD    board initialisation mode
  1487.  04h    WORD    board I/O address
  1488.         03D0h CGA emulation
  1489.         03B0h MDA emulation
  1490.         0390h no emulation
  1491.         0350h no emulation, alternate
  1492.  06h    WORD    emulation buffer segment
  1493.         B800h    CGA emulation
  1494.         B000h    MDA emulation
  1495.         0000h    no emulation
  1496.  08h    WORD    PG1600 graphics buffer segment
  1497.  0Ah    WORD    number of bytes between consecutive graphic rows
  1498.  0Ch    WORD    horizontal pixel size
  1499.  0Eh    WORD    vertical pixel size
  1500.  10h    WORD    horizontal dots per inch
  1501.  12h    WORD    vertical dots per inch
  1502.  14h    WORD    graphics buffer bits per pixel
  1503.  16h    WORD    monitor bits per pixel
  1504. --------N-214402-----------------------------
  1505. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  1506.     AX = 4402h
  1507.     BX = file handle referencing device "$IPCUST"
  1508.     CX, DS:DX ignored
  1509. Return: CF clear if successful
  1510.         AX destroyed
  1511.     CF set on error
  1512.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1513. Notes:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  1514.       version 2.05.     If less than the entire data is read or written,
  1515.       the next read/write continues where the previous one ended; this
  1516.       call and AX=4403h both reset the location at which the next
  1517.       operation starts to zero
  1518.     v2.1+ uses a new configuration method, but allows the installation
  1519.       of IPCUST.SYS for backward compatibility with other software which
  1520.       must read the PC/TCP configuration
  1521. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4403h"IPCUST"
  1522. --------N-214402-----------------------------
  1523. INT 21 - WORKGRP.SYS - GET API ENTRY POINT
  1524.     AX = 4402h
  1525.     BX = file handle for device "NET$HLP$"
  1526.     CX = 0008h
  1527.     DS:DX -> buffer for entry point record
  1528. Return: CF clear if successful
  1529.         AX = number of bytes actually read
  1530.     CF set on error
  1531.         AX = error code
  1532. Program: WORKGRP.SYS is distributed with MS-DOS 6.0 to permit communication
  1533.       with PCs running Windows for Workgroups or LAN Manager
  1534. SeeAlso: AH=3Fh"WORKGRP.SYS"
  1535.  
  1536. Format of entry point record:
  1537. Offset    Size    Description
  1538.  00h    WORD    3633h  \ signature???
  1539.  02h    WORD    EF6Fh  /
  1540.  04h    DWORD    address of entry point
  1541. Note:    first four bytes of buffer must be 6Fh E9h 33h 36h on entry when using
  1542.       IOCTL rather than READ to get the entry point record
  1543.  
  1544. Call WORKGRP entry point with:
  1545.     STACK:    WORD    function number (0000h-0009h)
  1546. Return: STACK unchanged
  1547.  
  1548. Call WORKGRP function 00h with:
  1549.     STACK:    WORD    0000h (function "get ???")
  1550. Return: DX:AX -> data table
  1551.  
  1552. Call WORKGRP function 01h with:
  1553.     STACK:    WORD    0001h (function "hook ???")
  1554. Return: STACK:    DWORD    pointer to ???
  1555.         WORD    0001h (function number)
  1556.  
  1557. Call WORKGRP function 02h with:
  1558.     STACK:    WORD    0002h (function "unhook ???")
  1559.     ???
  1560. Return: ???
  1561.  
  1562. Call WORKGRP function 03h with:
  1563.     STACK:    WORD    0003h (function "reenable printer port")
  1564.         WORD    LPT port number
  1565. Return: ???
  1566.  
  1567. Call WORKGRP function 04h with:
  1568.     STACK:    WORD    0004h (function "disable printer port")
  1569.         WORD    LPT port number
  1570. Return: ???
  1571.  
  1572. Call WORKGRP function 05h with:
  1573.     STACK:    WORD    0005h (function "???")
  1574.         ???
  1575. Return: ???
  1576.  
  1577. Call WORKGRP function 06h with:
  1578.     STACK:    WORD    0006h (function "???")
  1579. Return: STACK unchanged
  1580.     AX = 0000h
  1581.     DX = 0000h
  1582.  
  1583. Call WORKGRP functions 07h-09h with:
  1584.     STACK:    WORD    0007h-0009h (NOP functions)
  1585. Return: STACK unchanged
  1586.     AX = 0001h
  1587.     DX = 0000h
  1588. --------N-214402-----------------------------
  1589. INT 21 - 10NET v5.0 - 10BEUI.DOS - API
  1590.     AX = 4402h
  1591.     BX = file handle referencing device "10BEUI$"
  1592.     DS:DX -> parameter record (see below)
  1593.     CX ignored
  1594. Return: CF clear if successful
  1595.         AX destroyed
  1596.     CF set on error
  1597.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1598. SeeAlso: AX=4402h"10MEMMGR",INT 6F/AH=00h"10NET"
  1599.  
  1600. Format of parameter record:
  1601. Offset    Size    Description
  1602.  00h    WORD    000Ah (function number???)
  1603.  02h    WORD    ???
  1604.  04h    DWORD    pointer to buffer for ???
  1605.  08h  4 BYTEs    ???
  1606.  0Ch    WORD    transfer size
  1607. --------N-214402-----------------------------
  1608. INT 21 - 10NET v5.0 - 10MEMMGR.SYS - API
  1609.     AX = 4402h
  1610.     BX = file handle referencing device "MEMMGR0$"
  1611.     DS:DX -> 6-byte buffer for interface info (see below)
  1612.     CX ignored
  1613. Return: CF clear if successful
  1614.         AX destroyed
  1615.     CF set on error
  1616.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1617. SeeAlso: AX=4402h"10BEUI",INT 6F/AH=00h"10NET"
  1618.  
  1619. Format of interface info:
  1620. Offset    Size    Description
  1621.  00h    DWORD    address of entry point (see below)
  1622.  04h    WORD    version (0500h for v5.00)
  1623.  
  1624. Call entry point with:
  1625.     AL = 01h ???
  1626.         BX = ???
  1627.         Return: CF clear if successful
  1628.             CF set on error
  1629.             AX = error code
  1630.     AL = 02h ???
  1631.         ???
  1632.     AL = 03h ???
  1633.         ???
  1634.     AL = 04h set/restore memory allocation strategy
  1635.         BX = subfunction
  1636.         0000h set strategy
  1637.         0001h restore strategy
  1638.         Return: CF clear if successful
  1639.             CF set on error (if function disabled)
  1640.             various registers destroyed
  1641.     AL = other
  1642.         Return: CF set
  1643.             AX = 0000h
  1644.             BL = 01h
  1645. --------m-214402SF00-------------------------
  1646. INT 21 U - Memory Managers - GET API ENTRY POINT
  1647.     AX = 4402h subfn 00h
  1648.     BX = file handle for device "EMMXXXX0"
  1649.     CX = 0006h (size of buffer in bytes)
  1650.     DS:DX -> buffer for API entry point record (see below)
  1651.         first byte must be 00h on entry
  1652. Return: CF clear if successful
  1653.         buffer filled (see INT 67/AH=3Fh function 1B00h)
  1654.     CF set on error
  1655.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1656. Notes:    this function is supported by Microsoft EMM386.EXE v4.45+ and
  1657.       CEMM v5.10+
  1658.     if no other program has hooked INT 67, an alternate installation
  1659.       check for CEMM is testing for the string
  1660.       "COMPAQ EXPANDED MEMORY MANAGER 386" at offset 14h in the INT 67
  1661.       handler's segment; if present, the word at offset 12h contains the
  1662.       offset of the API entry point
  1663. SeeAlso: AX=4402h/SF=01h,AX=4402h/SF=02h,AX=4402h"EMM386",INT 67/AH=3Fh
  1664.  
  1665. Format of API entry point record:
  1666. Offset    Size    Description
  1667.  00h    WORD    ??? (0022h for CEMM 5.11, 0025h for MS EMM386 v4.45)
  1668.  02h    DWORD    manager's private API entry point (see below,INT 67/AX=FFA5h)
  1669.  
  1670. Call CEMM v5.10+ entry point with:
  1671.     AH = 00h get memory manager's state
  1672.         Return: AH = state
  1673.             bit 0: turned OFF
  1674.             bit 1: AUTO mode enabled
  1675.     AH = 01h set memory manager's state
  1676.         AL = new state (00h ON, 01h OFF, 02h AUTO)
  1677.         Return: CF clear if successful
  1678.             CF set on error
  1679.     AH = 02h Weitek coprocessor support
  1680.         AL = subfunction
  1681.         00h get Weitek support state
  1682.             Return: AL = status
  1683.                 bit 0: Weitek coprocessor is present
  1684.                 bit 1: Weitek support is enabled
  1685.         01h turn on Weitek support
  1686.         02h turn off Weitek support
  1687.         Return: CF clear if successful
  1688.             CF set on error
  1689.             AH = error code (01h invalid subfunc, 02h no Weitek)
  1690.     AH = 05h get statistics
  1691.         ???
  1692.     AH > 06h
  1693.         Return: CF set
  1694.             AH = 01h (invalid function)
  1695. Notes:    AH=03h,04h,06h are NOPs which return CF clear, presumably for backwards
  1696.       compatibility with earlier versions of CEMM
  1697.     in v5.11, AH=05h merely prints an error message (using INT 21/AH=09h)
  1698.       stating that a different version of CEMM is installed and it is
  1699.       therefore not possible to display the statistics
  1700. --------m-214402SF01-------------------------
  1701. INT 21 U - Memory Managers - GET EMM IMPORT STRUCTURE ADDRESS
  1702.     AX = 4402h subfn 01h
  1703.     BX = file handle for device "EMMXXXX0"
  1704.     CX = 0006h (size of buffer in bytes)
  1705.     DS:DX -> buffer for EMM import structure record (see below)
  1706.         first byte must be 01h on entry
  1707. Return: CF clear if successful
  1708.         buffer filled (see INT 67/AH=3Fh function 1B00h)
  1709.     CF set on error
  1710.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1711. Notes:    this function is supported by Microsoft EMM386.EXE v4.45+,
  1712.       QEMM-386 v6+, and CEMM v5.10+
  1713.     for QEMM-386, this call always returns an error if Windows3 support
  1714.       has been disabled with the NW3 switch
  1715. SeeAlso: AX=4402h/SF=00h,AX=4402h"EMM386",INT 2F/AX=D201h/BX=5145h
  1716. SeeAlso: INT 67/AH=3Fh
  1717.  
  1718. Format of EMM import structure record:
  1719. Offset    Size    Description
  1720.  00h    DWORD    physical address of EMM import structure
  1721.  04h    BYTE    EMM import structure major version
  1722.  05h    BYTE    EMM import structure minor version
  1723. --------m-214402SF02-------------------------
  1724. INT 21 U - Memory Managers - GET MEMORY MANAGER VERSION
  1725.     AX = 4402h subfn 02h
  1726.     BX = file handle for device "EMMXXXX0"
  1727.     CX = 0002h (size of buffer in bytes)
  1728.     DS:DX -> buffer for memory manager version (see below)
  1729.         first byte must be 02h on entry
  1730. Return: CF clear if successful
  1731.         buffer filled
  1732.     CF set on error
  1733.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1734. Note:    this function is supported by Microsoft EMM386.EXE v4.45+ and
  1735.       CEMM v5.10+
  1736. SeeAlso: AX=4402h/SF=00h,AX=4402h"EMM386",INT 67/AH=3Fh
  1737.  
  1738. Format of memory manager version:
  1739. Offset    Size    Description
  1740.  00h    BYTE    major version
  1741.  01h    BYTE    minor version (binary)
  1742. --------m-214402-----------------------------
  1743. INT 21 U - Microsoft EMM386.EXE v4.45 - GET MEMORY MANAGER INFORMATION
  1744.     AX = 4402h
  1745.     BX = file handle for device "EMMXXXX0"
  1746.     CX = size of buffer in bytes (varies, see below)
  1747.     DS:DX -> buffer for returned data (see below)
  1748.         first byte must be set on entry to indicate desired data
  1749. Return: CF clear if successful
  1750.         buffer filled
  1751.     CF set on error
  1752.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1753. Note:    an error is returned if the number of bytes to be read does not match
  1754.       the number of bytes returned for the specified data item
  1755. SeeAlso: AX=4402h/SF=00h,AX=4402h/SF=01h,AX=4402h/SF=02h,INT 67/AX=FFA5h
  1756.  
  1757. Format of data buffer:
  1758. Offset    Size    Description
  1759.  00h    BYTE    (call) function
  1760.         03h get ???
  1761.         04h get ???
  1762. ---function 03h---
  1763.  00h    WORD    ???
  1764.  02h    WORD    ???
  1765. ---function 04h---
  1766.  00h    WORD    segment of UMB containing EMM386 code/data
  1767.  02h    WORD    number of paragraphs of EMM386 code/data in UMB
  1768.  04h    WORD    ???
  1769. --------V-214402-----------------------------
  1770. INT 21 - Compaq AG1024.SYS - RGDI - GET DRIVER LOCATION
  1771.     AX = 4402h
  1772.     BX = file handle for device "$$$$RGDI"
  1773.     CX = 0006h (size of returned data)
  1774.     DS:DX -> location record (see below)
  1775. Return: CF clear if successful
  1776.         buffer filled
  1777.     CF set on error
  1778.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1779. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  1780. SeeAlso: AX=4403h"RGDI"
  1781.  
  1782. Format of location record:
  1783. Offset    Size    Description
  1784.  00h    WORD    signature 55AAh
  1785.  02h    WORD    segment of ???
  1786.  04h    WORD    segment of device driver's code
  1787. --------N-214402-----------------------------
  1788. INT 21 - FTPSOFT.DOS - GET ???
  1789.     AX = 4402h
  1790.     BX = file handle for device "FTPSOFT$"
  1791.     CX = size of buffer
  1792.     DS:DX -> buffer for data (see below)
  1793. Return: CF clear if successful
  1794.         buffer filled
  1795.     CF set on error
  1796.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1797. SeeAlso: AH=3Fh"PC/TCP"
  1798.  
  1799. Format of data:
  1800. Offset    Size    Description
  1801.  00h    WORD    (call) BA98h (if different, no data returned)
  1802.  02h    DWORD    -> ???
  1803.  06h    DWORD    (call) -> record with new data (see below)
  1804.  0Ah    DWORD    -> ???
  1805.  0Eh    DWORD    ???
  1806.  12h    DWORD    -> ??? function
  1807.  16h    BYTE    ???
  1808.  
  1809. Format of new data:
  1810. Offset    Size    Description
  1811.  00h  8 BYTEs    ???
  1812.  08h    WORD    ??? \ may be a DWORD
  1813.  0Ah    WORD    ??? /
  1814.  0Ch    DWORD    ???
  1815.  10h    DWORD    ???
  1816.  14h    DWORD    ???
  1817.  18h    DWORD    ???
  1818.  1Ch    DWORD    ???
  1819. --------D-214403-----------------------------
  1820. INT 21 - DOS 2+ - IOCTL - WRITE TO CHARACTER DEVICE CONTROL CHANNEL
  1821.     AX = 4403h
  1822.     BX = file handle referencing character device
  1823.     CX = number of bytes to write
  1824.     DS:DX -> data to write
  1825. Return: CF clear if successful
  1826.         AX = number of bytes actually written
  1827.     CF set on error
  1828.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1829. Notes:    format of data is driver-specific (see below for some specific cases)
  1830.     if the file handle refers to "4DOSSTAK", the 4DOS (v2.x-3.03)
  1831.       KEYSTACK.SYS driver will push the specified characters on the
  1832.       keyboard stack; similarly for "NDOSSTAK", the NDOS KEYSTACK.SYS
  1833.       driver will push the characters onto the keyboard stack
  1834. SeeAlso: AX=4400h,AX=4402h,AX=4405h,INT 2F/AX=122Bh,INT 2F/AX=D44Dh
  1835. SeeAlso: INT 2F/AX=D44Fh
  1836. --------c-214403-----------------------------
  1837. INT 21 - SMARTDRV.SYS - IOCTL - CACHE CONTROL
  1838.     AX = 4403h
  1839.     BX = handle for device "SMARTAAR"
  1840.     CX = number of bytes to write
  1841.     DS:DX -> SMARTDRV control block (see below)
  1842. Return: CF clear if successful
  1843.         AX = number of bytes actually written
  1844.            = 0000h if control block too small for given command
  1845.     CF set on error
  1846.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1847. SeeAlso: AX=4402h"SMARTDRV",INT 2F/AX=4A10h/BX=0000h
  1848.  
  1849. Format of SMARTDRV control block:
  1850. Offset    Size    Description
  1851.  00h    BYTE    function code
  1852.         00h flush cache
  1853.         01h flush and discard cache
  1854.         02h disable caching (flushes and discards cache first)
  1855.         03h enable caching
  1856.         04h control write caching
  1857.         05h set flushing tick count
  1858.         06h lock cache contents
  1859.         07h unlock cache contents
  1860.         08h set flush-on-reboot flag
  1861.         09h unused
  1862.         0Ah control full-track caching
  1863.         0Bh reduce cache size
  1864.         0Ch increase cache size
  1865.         0Dh set INT 13 chain address
  1866. ---function 04h---
  1867.  01h    BYTE    write caching control action
  1868.         00h turn off write-through
  1869.         01h turn on write-through
  1870.         02h turn off write buffering (also flushes cache)
  1871.         03h turn on write buffering (also flushes cache)
  1872. ---function 05h---
  1873.  01h    WORD    number of timer ticks between cache flushes
  1874. ---function 08h---
  1875.  01h    BYTE    new flush-on-reboot flag (00h off, 01h on)
  1876. ---function 0Ah---
  1877.  01h    BYTE    full-track writes are
  1878.         00h not cached
  1879.         01h cached
  1880. ---functions 0Bh,0Ch---
  1881.  01h    WORD    number of 16K pages by which to increase/reduce cache size
  1882. ---function 0Dh---
  1883.  01h    DWORD    new address to which to chain on INT 13
  1884. Note:    the previous address is not preserved
  1885. --------d-214403-----------------------------
  1886. INT 21 - CD-ROM device driver - IOCTL OUTPUT
  1887.     AX = 4403h
  1888.     BX = file handle referencing character device for CD-ROM driver
  1889.     CX = number of bytes to write
  1890.     DS:DX -> control block (see below)
  1891. Return: CF clear if successful
  1892.         AX = number of bytes actually written
  1893.     CF set on error
  1894.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1895. SeeAlso: AX=4402h"CD-ROM",INT 2F/AX=0802h
  1896.  
  1897. Format of control block:
  1898. Offset    Size    Description
  1899.  00h    BYTE    function code
  1900.         00h eject disk
  1901.         01h lock/unlock door
  1902.         02h reset drive
  1903.         03h control audio channel
  1904.         04h write device control string
  1905.         05h close tray
  1906. ---functions 00h,02h,05h---
  1907.  no further fields
  1908. ---function 01h---
  1909.  01h    BYTE    lock function
  1910.         00h unlock door
  1911.         01h lock door
  1912. ---function 03h---
  1913.  01h    BYTE    input channel (0-3) for output channel 0
  1914.  02h    BYTE    volume for output channel 0
  1915.  03h    BYTE    input channel (0-3) for output channel 1
  1916.  04h    BYTE    volume for output channel 1
  1917.  05h    BYTE    input channel (0-3) for output channel 2
  1918.  06h    BYTE    volume for output channel 2
  1919.  07h    BYTE    input channel (0-3) for output channel 3
  1920.  08h    BYTE    volume for output channel 3
  1921. Note:    output channels 0 and 1 are left and right, 2 and 3 are left prime and
  1922.       right prime; a volume of 00h is off
  1923. ---function 04h---
  1924.  01h  N BYTEs    bytes to send directly to the CD-ROM drive without
  1925.         interpretation
  1926. --------d-214403-----------------------------
  1927. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  1928.     AX = 4403h
  1929.     BX = handle for device "SCSITAPE"
  1930.     CX = number of bytes to write
  1931.     DS:DX -> SCSITAPE control block (see below)
  1932. Return: CF clear if successful
  1933.         AX = number of bytes actually written
  1934.     CF set on error
  1935.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1936. SeeAlso: AX=4405h"ST-01",INT 78/AH=10h
  1937.  
  1938. Format of SCSITAPE control block:
  1939. Offset    Size    Description
  1940.  00h    WORD    command type
  1941.         'F' Format (argument 1 = interleave, argument 2 = format type)
  1942.         'E' Erase
  1943.         'R' Rewind
  1944.         'L' Load
  1945.         'N' No Load
  1946.         'S' Space (argument 1 = count, argument 2 = type)
  1947.         'M' File Mark (argument 1 = count)
  1948.         'A' Reassign
  1949.  02h    WORD    argument 1
  1950.  04h    WORD    argument 2
  1951.  06h    WORD    segment of command buffer
  1952.  08h    WORD    offset of command buffer
  1953.  0Ah    WORD    length of command buffer
  1954. --------E-214403-----------------------------
  1955. INT 21 U - AI Architects - OS/x86??? - API
  1956.     AX = 4403h
  1957.     BX = handle for device "AIA_OS"
  1958.     CX = number of bytes to write (ignored)
  1959.     DS:DX -> 12-byte buffer, first byte is command:
  1960.             81h installation check
  1961.             82h get API entry point
  1962.             84h uninstall
  1963. Return: CF clear if successful
  1964.         AX = number of bytes actually written
  1965.     CF set on error
  1966.         AX = error code (01h,05h,06h,0Ch,0Dh) (see AH=59h)
  1967. Notes:    these functions are only available if the DOS extender was loaded as a
  1968.       device driver in CONFIG.SYS
  1969.     called by TKERNEL (a licensed version of AI Architects/Ergo OS/x86)
  1970. SeeAlso: INT 2F/AX=FBA1h/BX=0081h,INT 2F/AX=FBA1h/BX=0082h
  1971. Index:    installation check;OS/x86|entry point;OS/x86|uninstall;OS/x86
  1972.  
  1973. Format of buffer on return:
  1974. Offset    Size    Description
  1975.  00h  4 BYTEs    signature "IABH"
  1976. ---if func 81h---
  1977.  (no additional fields)
  1978. ---if func 82h---
  1979.  04h    DWORD    pointer to API entry point (see INT 2F/AX=FBA1h/BX=0082h)
  1980. ---if func 84h---
  1981.  04h    WORD    success indicator
  1982.  06h    WORD    segment of ???
  1983.  08h    WORD    segment of ??? memory block to free if nonzero
  1984.  0Ah    WORD    segment of ??? memory block to free if nonzero
  1985. --------V-214403-----------------------------
  1986. INT 21 - PGS1600.DEV - IOCTL - SET CONFIGURATION???
  1987.     AX = 4403h
  1988.     BX = file handle for device "PGS1600$"
  1989.     CX = 0018h (size of buffer)
  1990.     DS:DX -> configuration buffer (see AX=4402h"PGS1600")
  1991. Return: CF clear if successful
  1992.         AX = number of bytes actually written
  1993.     CF set on error
  1994.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  1995. Program: PGS1600.DEV is a device driver for the Cornerstone Technology PG1600
  1996.       display adapter, which provides a 1600x1200 monochrome display as
  1997.       well as one of two emulations, MDA or CGA.
  1998. SeeAlso: AX=4402h"PGS1600"
  1999. --------N-214403-----------------------------
  2000. INT 21 - PC/TCP IPCUST.SYS - RESET CONFIGURATION DATA READ POINTER
  2001.     AX = 4403h
  2002.     BX = file handle referencing device "$IPCUST"
  2003.     CX, DS:DX ignored
  2004. Return: CF clear if successful
  2005.         AX destroyed
  2006.     CF set on error
  2007.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2008. Notes:    there are a total of 378h bytes of configuration data for IPCUST.SYS
  2009.       version 2.05.     If less than the entire data is read or written,
  2010.       the next read/write continues where the previous one ended; this
  2011.       call and AX=4402h both reset the location at which the next
  2012.       operation starts to zero
  2013.     v2.1+ uses a new configuration method, but allows the installation
  2014.       of IPCUST.SYS for backward compatibility with other software which
  2015.       must read the PC/TCP configuration
  2016. SeeAlso: AH=3Fh"IPCUST",AH=40h"IPCUST",AX=4402h"IPCUST"
  2017. --------V-214403-----------------------------
  2018. INT 21 - Compaq AG1024.SYS - CPQ_MGES - IOCTL OUTPUT
  2019.     AX = 4403h
  2020.     BX = file handle referencing device "CPQ_MGES"
  2021.     DS:DX -> request packet (see below)
  2022.     CX ignored
  2023. Return: CF clear if successful
  2024.         AX destroyed
  2025.         data buffer filled (if applicable)
  2026.         first word of request packet set to number of bytes of data
  2027.           available (amount returned is smaller of this and requested
  2028.           amount)
  2029.     CF set on error
  2030.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2031. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  2032. SeeAlso: AX=4403h"RGDI"
  2033.  
  2034. Format of request packet:
  2035. Offset    Size    Description
  2036.  00h    WORD    function
  2037.         0000h get ??? (26h bytes)
  2038.         0001h get ??? (36h bytes)
  2039.         0002h set ??? (same as returned by function 0001h)
  2040.         0003h get ??? (6 bytes)
  2041.         0004h get ???
  2042.         0005h get ???
  2043.         0006h get ??? (10h bytes)
  2044.         0007h set ??? (same as returned by function 0006h)
  2045. ---functions 00h-03h,06h,07h---
  2046.  02h    WORD    size of data buffer
  2047.  04h    DWORD    -> buffer for function's data
  2048.  ---functions 04h,05h---
  2049.  02h    WORD    ???
  2050.  04h    WORD    size of data buffer
  2051.  06h    DWORD    -> buffer to receive data
  2052. --------V-214403-----------------------------
  2053. INT 21 - Compaq AG1024.SYS - RGDI - IOCTL OUTPUT
  2054.     AX = 4403h
  2055.     BX = file handle referencing device "$$$$RGDI"
  2056.     DS:DX -> request packet (see below)
  2057.     CX ignored
  2058. Return: CF clear if successful
  2059.         AX destroyed
  2060.         data buffer filled (if applicable)
  2061.         first word of request packet set to number of bytes of data
  2062.           available (amount returned is smaller of this and requested
  2063.           amount)
  2064.     CF set on error
  2065.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2066. Program: AG1024.SYS is a device driver for the Advanced Graphics 1024 adapter
  2067. SeeAlso: AX=4402h"RGDI",AX=4403h"CPQ_MGES"
  2068.  
  2069. Format of request packet:
  2070. Offset    Size    Description
  2071.  00h    WORD    function
  2072.         0000h get entry points
  2073.         0001h get ???
  2074.  02h    DWORD    address of buffer for returned data
  2075. ----------214403SF01-------------------------
  2076. INT 21 U - Qualitas 386MAX v6.01+ - TURN 386MAX OFF
  2077.     AX = 4403h subfn 01h
  2078.     BX = handle for device "386MAX$$"
  2079.     DS:DX -> BYTE 01h
  2080.     CX ignored
  2081. Return: DS:DX -> BYTE status (00h = successful)
  2082.     CF clear if successful
  2083.         AX destroyed
  2084.     CF set on error
  2085.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2086. Note:    this function will fail if any EMS or UMBs are in use
  2087. SeeAlso: AX=4403h/SF=02h,AX=4403h/SF=03h,AX=4403h/SF=05h
  2088. ----------214403SF02-------------------------
  2089. INT 21 U - Qualitas 386MAX v6.01+ - TURN 386MAX ON
  2090.     AX = 4403h subfn 02h
  2091.     BX = handle for device "386MAX$$"
  2092.     DS:DX -> BYTE 02h
  2093.     CX ignored
  2094. Return: DS:DX -> BYTE status (00h = successful)
  2095.     CF clear if successful
  2096.         AX destroyed
  2097.     CF set on error
  2098.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2099. SeeAlso: AX=4403h/SF=01h,AX=4403h/SF=03h,AX=4403h/SF=05h
  2100. --------m-214403SF03-------------------------
  2101. INT 21 U - Qualitas 386MAX v6.01+ - SET STATE
  2102.     AX = 4403h subfn 03h
  2103.     BX = handle for device "386MAX$$"
  2104.     CX = number of bytes to copy (up to size of state buffer)
  2105.     DS:DX -> BYTE 03h followed by state buffer (see AX=4402h"386MAX")
  2106. Return: CF clear if successful
  2107.         AX = number of bytes actually written
  2108.     CF set on error
  2109.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2110. Note:    the first byte of the buffer must be either 01h, 02h, or 03h
  2111.       (specifying the version of the state record) and the buffer must
  2112.       contain CX bytes AFTER the initial byte
  2113. SeeAlso: AX=4402h"386MAX"
  2114. ----------214403SF05-------------------------
  2115. INT 21 U - Qualitas 386MAX v7.00+ - LIMIT AUTOMATIC ACTIVATION TO STD EMS CALLS
  2116.     AX = 4403h subfn 05h
  2117.     BX = handle for device "386MAX$$"
  2118.     DS:DX -> BYTE 05h
  2119.     CX ignored
  2120. Return: CF clear if successful
  2121.         AX destroyed
  2122.     CF set on error
  2123.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2124. Desc:    specifies that 386MAX will only shift from AUTO to ON mode on standard
  2125.       EMS calls INT 67/AH=40h-5Dh
  2126. SeeAlso: AX=4403h/SF=02h,AX=4403h/SF=03h,AX=4403h/SF=06h
  2127. ----------214403SF06-------------------------
  2128. INT 21 U - Qualitas 386MAX v7.00+ - ALLOW AUTOMATIC ACTIVATION ON ANY INT 67
  2129.     AX = 4403h subfn 06h
  2130.     BX = handle for device "386MAX$$"
  2131.     DS:DX -> BYTE 06h
  2132.     CX ignored
  2133. Return: CF clear if successful
  2134.         AX destroyed
  2135.     CF set on error
  2136.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2137. Desc:    specified that 386MAX should shift from AUTO to ON mode on any INT 67
  2138.       call other than INT 67/AH=3Fh
  2139. SeeAlso: AX=4403h/SF=01h,AX=4403h/SF=03h,AX=4403h/SF=05h
  2140. --------D-214404-----------------------------
  2141. INT 21 - DOS 2+ - IOCTL - READ FROM BLOCK DEVICE CONTROL CHANNEL
  2142.     AX = 4404h
  2143.     BL = drive number (00h = default, 01h = A:, etc.)
  2144.     CX = number of bytes to read
  2145.     DS:DX -> buffer
  2146. Return: CF clear if successful
  2147.         AX = number of bytes actually read
  2148.     CF set on error
  2149.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2150. Note:    format of data is driver-specific
  2151. SeeAlso: AX=4402h,AX=4405h,INT 2F/AX=122Bh
  2152. --------d-214404-----------------------------
  2153. INT 21 - Stacker - GET DEVICE DRIVER ADDRESS AND SET VOLUME NUMBER
  2154.     AX = 4404h
  2155.     BL = drive number (00h = default, 01h = A:, etc.)
  2156.     CX = 0004h
  2157.     DS:DX -> DWORD buffer to receive device driver address
  2158. Note:    In addition to returning the address of the Stacker device driver,
  2159.       this call also sets the volume number at offset 3Eh in the device
  2160.       driver (see INT 25/AX=CDCDh)
  2161. SeeAlso: INT 25/AX=CDCDh
  2162. --------d-214404-----------------------------
  2163. INT 21 - Stacker - GET STACVOL FILE SECTORS
  2164.     AX = 4404h
  2165.     BL = drive number (0 is current drive)
  2166.     CX = byte count (i.e., 200h = 1 sector)
  2167.     DS:DX -> buffer (see below)
  2168. Return: Data Buffer contains the number of sectors requested from the
  2169.       STACVOL physical file for the drive specified.
  2170.  
  2171. Format of stacker buffer:
  2172. Offset    Size    Description
  2173.  00h    WORD    01CDh
  2174.  02h    WORD    sector count
  2175.  04h    DWORD    number of starting sector
  2176.  08h    DWORD    far pointer to Data Buffer
  2177. --------d-214404-----------------------------
  2178. INT 21 - DUBLDISK.SYS v2.6 - GET INFO
  2179.     AX = 4404h
  2180.     BL = drive number of DoubleDisk drive (00h = default, 01h = A:, etc.)
  2181.     CX = number of bytes (000Ah-0014h, call ignored otherwise)
  2182.     DS:DX -> data record (see below)
  2183. Return: CF clear if successful
  2184.         AX = number of bytes read
  2185.     CF set on error
  2186.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2187. Program: DUBLDISK.SYS is the device driver portion of DoubleDisk, a disk
  2188.       expander by Vertisoft Systems, Inc.
  2189. Note:    the installation check consists of scanning memory for the signature
  2190.       "FAT 2.6  byte:", which is immediately followed by a data table
  2191. SeeAlso: AX=440Dh
  2192. Index:    installation check;DUBLDISK.SYS
  2193.  
  2194. Format of data record:
  2195. Offset    Size    Description
  2196.  00h    WORD    (call) signature 4444h
  2197.  02h    BYTE    (call) function
  2198.             00h ???
  2199.             01h ???
  2200. ---function 00h---
  2201.  02h    BYTE    (return) ???
  2202.  03h    BYTE    (return) ???
  2203. ---function 01h---
  2204.  02h    WORD    (return) 4444h
  2205.  04h    WORD    allocation unit size???
  2206.  06h    WORD    ???
  2207.  08h    WORD    ???
  2208.  0Ah    BYTE    ???
  2209.  
  2210. Format of signature data table:
  2211. Offset    Size    Description
  2212.  00h  5 BYTEs    ???
  2213.  05h    BYTE    first drive number
  2214.  06h    BYTE    number of drives
  2215.  07h    ???
  2216. --------d-214404-----------------------------
  2217. INT 21 - DBLSPACE.BIN - IOCTL - FLUSH OR INVALIDATE INTERNAL CACHES
  2218.     AX = 4404h
  2219.     BL = drive number (00h = default, 01h = A:, etc)
  2220.     CX = 000Ah (size of DSPACKET structure)
  2221.     DS:DX -> DSPACKET structure (see below)
  2222. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  2223.         AX = number of bytes actually transferred
  2224.     CF set on error
  2225.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2226. SeeAlso: AX=4405h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  2227.  
  2228. Format of DSPACKET structure:
  2229. Offset    Size    Description
  2230.  00h    WORD    signature 444Dh ("DM")
  2231.  02h    BYTE    command code
  2232.         46h ('F') flush internal caches
  2233.         49h ('I') flush and invalidate internal caches
  2234.  03h    WORD    result code
  2235.         (return) 4F4Bh ("OK") if successful, else unchanged
  2236.  05h  5 BYTEs    padding
  2237. --------d-214404-----------------------------
  2238. INT 21 U - xDISK v3.31 - CONFIGURE
  2239.     AX = 4404h
  2240.     BL = drive number (00h = default, 01h = A:, etc)
  2241.     CX = 0047h (length of version string)
  2242.     DS:DX -> 79-byte buffer for version string and ???
  2243.     DS:0081h = commandline containing new switches for driver
  2244. Return: CF clear if successful
  2245.         AX = number of bytes actually transferred
  2246.     CF set on error
  2247.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2248. Program: xDISK is a shareware resizeable EMS RAMdisk by FM de Monasterio
  2249. SeeAlso: AX=4405h"xDISK",INT 2F/AH=DDh"xDISK"
  2250. ----------214404-----------------------------
  2251. INT 21 - COMBI-disk v1.13 - GET DATA RECORD
  2252.     AX = 4404h
  2253.     BL = drive number (00h = default, 01h = A:, etc)
  2254.     CX =  (length of data packet)
  2255.     DS:DX -> buffer for data packet (see below)
  2256. Return: CF clear if successful
  2257.         AX = number of bytes actually transferred
  2258.     CF set on error
  2259.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2260. Program: COMBI-disk is a shareware combination cache and RAMdisk sharing a
  2261.       single pool of memory by Vadim V. Vlasov
  2262. Note:    the installation check consists of scanning the valid drives for one
  2263.       which returns a correctly-sized data packet with the proper
  2264.       signature in the first field
  2265. SeeAlso: AX=4405h"COMBI"
  2266. Index:    installation check;COMBI-disk
  2267.  
  2268. Format of data packet:
  2269. Offset    Size    Description
  2270.  00h  6 BYTEs    ASCIZ signature "COMBI"
  2271.  06h    WORD    version (high byte = major, low = decimal minor version)
  2272.  08h    BYTE    current options (see below)
  2273.  09h    BYTE    sectors per allocation block
  2274.  0Ah    WORD    maximum buffer in KB
  2275.  0Ch    WORD    current buffer in KB (less than max if XMS memory being lent)
  2276.  0Eh    WORD    total number of allocation blocks
  2277.  10h    WORD    current number of allocation blocks
  2278.  12h    WORD    number of blocks being used by RAM disk
  2279.  14h    WORD    number of blocks being used by cache or unused
  2280.  16h    WORD    number of dirty cache blocks
  2281.  18h    WORD    number of blocks which could not be written out due to errors
  2282.  1Ah    WORD    total number of read requests
  2283.  1Ch    WORD    total number of sectors read
  2284.  1Eh    WORD    number of BIOS read requests (cache misses)
  2285.  20h    WORD    number of sectors read via BIOS (cache misses)
  2286.  22h    WORD    total number of write requests
  2287.  24h    WORD    total number of sectors written
  2288.  26h    WORD    number of BIOS write requests
  2289.  28h    WORD    number of sectors written via BIOS
  2290.  2Ah    WORD    number of RAM disk read requests
  2291.  2Ch    WORD    number of sectors read from RAM disk
  2292.  2Eh    WORD    number of RAM disk write requests
  2293.  30h    WORD    number of sectors written to RAM disk
  2294. --------D-214405-----------------------------
  2295. INT 21 - DOS 2+ - IOCTL - WRITE TO BLOCK DEVICE CONTROL CHANNEL
  2296.     AX = 4405h
  2297.     BL = drive number (00h = default, 01h = A:, etc)
  2298.     CX = number of bytes to write
  2299.     DS:DX -> data to write
  2300. Return: CF clear if successful
  2301.         AX = number of bytes actually written
  2302.     CF set on error
  2303.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2304. Note:    format of data is driver-specific
  2305. SeeAlso: AX=4403h,AX=4404h,INT 2F/AX=122Bh
  2306. --------d-214405-----------------------------
  2307. INT 21 - Brian Antoine Seagate ST-01 SCSI.SYS - IOCTL - EXECUTE COMMANDS
  2308.     AX = 4405h
  2309.     BX = drive number (00h = default, 01h = A:, etc)
  2310.     CX = number of bytes to write
  2311.     DS:DX -> SCSIDISK control block (see AX=4403h"ST-01")
  2312. Return: CF clear if successful
  2313.         AX = number of bytes actually written
  2314.     CF set on error
  2315.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2316. SeeAlso: AX=4403h"ST-01"
  2317. --------d-214405-----------------------------
  2318. INT 21 U - DBLSPACE.BIN - IOCTL - FLUSH OR INVALIDATE INTERNAL CACHES
  2319.     AX = 4405h
  2320.     BL = drive number (00h = default, 01h = A:, etc)
  2321.     CX = 000Ah (size of DSPACKET structure)
  2322.     DS:DX -> DSPACKET structure (see below)
  2323. Return: CF clear if IOCTL successful -- check DSPACKET for actual status
  2324.         AX = number of bytes actually transferred
  2325.     CF set on error
  2326.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2327. Note:    this call is identical to the documented AX=4404h
  2328. SeeAlso: AX=4404h"DBLSPACE",INT 2F/AX=4A11h/BX=0000h
  2329.  
  2330. Format of DSPACKET structure:
  2331. Offset    Size    Description
  2332.  00h    WORD    signature 444Dh ("DM")
  2333.  02h    BYTE    command code
  2334.         46h ('F') flush internal caches
  2335.         49h ('I') flush and invalidate internal caches
  2336.  03h    WORD    result code
  2337.         (return) 4F4Bh ("OK") if successful, else unchanged
  2338.  05h  5 BYTEs    padding
  2339. --------d-214405-----------------------------
  2340. INT 21 U - xDISK v3.31 - ???
  2341.     AX = 4405h
  2342.     BL = drive number (00h = default, 01h = A:, etc)
  2343.     CX = number of bytes to write
  2344.     DS:DX -> buffer containing version string
  2345.     ???
  2346. Return: CF clear if successful
  2347.         AX = number of bytes actually transferred
  2348.     CF set on error
  2349.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2350. Program: xDISK is a shareware resizeable EMS RAMdisk by FM de Monasterio
  2351. SeeAlso: AX=4404h"xDISK",INT 2F/AH=DDh"xDISK"
  2352. --------d-214405-----------------------------
  2353. INT 21 - COMBI-disk v1.13 - CONTROL COMBI-disk
  2354.     AX = 4405h
  2355.     BL = drive number (00h = default, 01h = A:, etc) for RAM disk
  2356.     CX = number of bytes to write
  2357.     DS:DX -> buffer containing command packet (see below)
  2358. Return: CF clear if successful
  2359.         AX = number of bytes actually transferred
  2360.     CF set on error
  2361.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2362. SeeAlso: AX=4404h"COMBI"
  2363.  
  2364. Format of command packet:
  2365. Offset    Size    Description
  2366.  00h    WORD    version
  2367.  02h    BYTE    command code
  2368.         80h flush cache
  2369.         81h change options byte
  2370.         82h shrink memory
  2371.         83h expand memory
  2372.         84h get dirty block information
  2373.         85h reset write errors
  2374.         86h reset counters
  2375. ---command code 81h---
  2376.  03h    BYTE    new options byte (see below)
  2377. ---command code 82h---
  2378.  03h    WORD    number of KB to release
  2379. ---command code 83h---
  2380.  03h    WORD    number of KB to expand
  2381. ---command code 84h---
  2382.  03h    DWORD    -> buffer for block info (see below)
  2383. ---command code 85h---
  2384.  03h    DWORD    block ID
  2385. ---command code 86h---
  2386.  03h    BYTE    which counters to reset
  2387.         bit 0: hard disk read counts
  2388.         bit 1: hard disk write counts
  2389.         bit 2: RAM disk read/write counts
  2390. Note:    multiple commands may be placed in a single packet by stringing
  2391.       together as many command/argument pairs as desired
  2392.  
  2393. Bitfields for options byte:
  2394.  bit 0    cache off
  2395.  bit 1    cache frozen
  2396.  bit 2    write caching enabled
  2397.  bit 3    delayed writing disabled
  2398.  bit 5    fix memory allocation (no XMS lending)
  2399.  bit 6    no 'sector not found' error
  2400.  
  2401. Format of block info:
  2402. Offset    Size    Description
  2403.  00h    DWORD    block ID
  2404.  04h    BYTE    bitmask of valid sectors in block
  2405.  05h    BYTE    bitmask of dirty sectors in block
  2406.  06h    BYTE    last error returned by BIOS
  2407.  07h    BYTE    number of errors
  2408. --------D-214406-----------------------------
  2409. INT 21 - DOS 2+ - IOCTL - GET INPUT STATUS
  2410.     AX = 4406h
  2411.     BX = file handle
  2412. Return: CF clear if successful
  2413.         AL = input status
  2414.         00h not ready (device) or at EOF (file)
  2415.         FFh ready
  2416.     CF set on error
  2417.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2418. Note:    files may not register as being at EOF if positioned there by AH=42h
  2419. SeeAlso: AX=4407h,INT 2F/AX=122Bh
  2420. --------D-214407-----------------------------
  2421. INT 21 - DOS 2+ - IOCTL - GET OUTPUT STATUS
  2422.     AX = 4407h
  2423.     BX = file handle
  2424. Return: CF clear if successful
  2425.         AL = input status
  2426.         00h not ready
  2427.         FFh ready
  2428.     CF set on error
  2429.         AX = error code (01h,05h,06h,0Dh) (see AH=59h)
  2430. Note:    for DOS 2+, files are always ready for output, even if the disk is
  2431.       full or no media is in the drive
  2432. SeeAlso: AX=4406h,INT 2F/AX=122Bh
  2433. --------D-214408-----------------------------
  2434. INT 21 - DOS 3.0+ - IOCTL - CHECK IF BLOCK DEVICE REMOVABLE
  2435.     AX = 4408h
  2436.     BL = drive number (00h = default, 01h = A:, etc)
  2437. Return: CF clear if successful
  2438.         AX = 0000h if removable
  2439.            = 0001h if fixed
  2440.     CF set on error
  2441.         AX = error code (01h,0Fh) (see AH=59h)
  2442. SeeAlso: AX=4400h,AX=4409h,INT 2F/AX=122Bh
  2443. --------D-214409-----------------------------
  2444. INT 21 - DOS 3.1+ - IOCTL - CHECK IF BLOCK DEVICE REMOTE
  2445.     AX = 4409h
  2446.     BL = drive number (00h = default, 01h = A:, etc)
  2447. Return: CF clear if successful
  2448.         DX = device attribute word
  2449.         bit 15: drive is SUBSTituted
  2450.         bit 12: drive is remote
  2451.         bit  9: direct I/O not allowed
  2452.     CF set on error
  2453.         AX = error code (01h,0Fh) (see AH=59h)
  2454. Note:    on local drives, DX bits not listed above are the attribute word from
  2455.       the device driver header (see AH=52h); for remote drives, the other
  2456.       bits appear to be undefined for DOS versions prior to 5.0 (they are
  2457.       all cleared in DOS 5+)
  2458. SeeAlso: AX=4400h,AX=4408h,AX=440Ah,INT 2F/AX=122Bh
  2459. --------D-21440A-----------------------------
  2460. INT 21 - DOS 3.1+ - IOCTL - CHECK IF HANDLE IS REMOTE
  2461.     AX = 440Ah
  2462.     BX = handle
  2463. Return: CF clear if successful
  2464.         DX = attribute word (as stored in SFT)
  2465.         bit 15: set if remote
  2466.         bit 14: date/time not set on close
  2467.     CF set on error
  2468.         AX = error code (01h,06h) (see AH=59h)
  2469. Notes:    if file is remote, Novell Advanced NetWare 2.0 returns the number of
  2470.       the file server on which the handle is located in CX
  2471.     DR-DOS 3.41 and 5.0 clear all bits of DX except bit 15
  2472. SeeAlso: AX=4400h,AX=4409h,AH=52h,INT 2F/AX=122Bh
  2473. --------D-21440B-----------------------------
  2474. INT 21 - DOS 3.1+ - IOCTL - SET SHARING RETRY COUNT
  2475.     AX = 440Bh
  2476.     CX = pause between retries (default 1)
  2477.     DX = number of retries (default 3)
  2478. Return: CF clear if successful
  2479.     CF set on error
  2480.         AX = error code (01h) (see AH=59h)
  2481. Notes:    delay is dependent on processor speed (value in CX specifies number of
  2482.       64K-iteration empty loops to execute)
  2483.     if DX=0000h on entry, the retry count is left unchanged
  2484. SeeAlso: AH=52h,INT 2F/AX=1224h,INT 2F/AX=122Bh
  2485. --------D-21440C-----------------------------
  2486. INT 21 - DOS 3.2+ - IOCTL - GENERIC CHARACTER DEVICE REQUEST
  2487.     AX = 440Ch
  2488.     BX = device handle
  2489.     CH = category code
  2490.         00h unknown (DOS 3.3+)
  2491.         01h COMn: (DOS 3.3+)
  2492.         03h CON (DOS 3.3+)
  2493.         05h LPTn:
  2494.         9Eh Media Access Control driver (STARLITE)
  2495.         00h-7Fh reserved for Microsoft
  2496.         80h-FFh reserved for OEM/user-defined
  2497.     CL = function
  2498.         00h MAC driver Bind (STARLITE)
  2499.         45h set iteration (retry) count
  2500.         4Ah select code page
  2501.         4Ch start code-page preparation
  2502.         4Dh end code-page preparation
  2503.         5Fh set display information (DOS 4+)
  2504.         65h get iteration (retry) count
  2505.         6Ah query selected code page
  2506.         6Bh query prepare list
  2507.         7Fh get display information (DOS 4+)
  2508.     DS:DX -> parameter block (see below)
  2509.     SI = parameter to pass to driver (European MS-DOS 4.0, OS/2 comp box)
  2510.     DI = parameter to pass to driver (European MS-DOS 4.0, OS/2 comp box)
  2511. Return: CF set on error
  2512.         AX = error code (see AH=59h)
  2513.     CF clear if successful
  2514.         DS:DX -> iteration count if CL=65h
  2515.         SI = returned value (European MS-DOS 4.0, OS/2 comp box)
  2516.         DI = returned value (European MS-DOS 4.0, OS/2 comp box)
  2517. Notes:    bit assignments for function code in CL:
  2518.         bit 7: set to ignore if unsupported, clear to return error
  2519.         bit 6: set if passed to driver, clear if intercepted by DOS
  2520.         bit 5: set if queries data from device, clear if sends command
  2521.         bits 4-0: subfunction
  2522.     DR-DOS 3.41 and 5.0 return error code 16h on CL=45h,65h if the device
  2523.       does not support a retry counter
  2524. SeeAlso: AX=440Dh,INT 2F/AX=0802h,INT 2F/AX=122Bh,INT 2F/AX=14FFh
  2525. SeeAlso: INT 2F/AX=1A01h
  2526.  
  2527. Format of parameter block for function 00h:
  2528. Offset    Size    Description
  2529.  00h  8 BYTEs    ASCIZ signature "STARMAC"
  2530.  08h    WORD    version
  2531.  0Ah    WORD    flags
  2532.         bit 0: media requires connect or listen request before use
  2533.         bit 1: network is a LAN (broadcast/multicast supported)
  2534.         bit 2: point-to-point network
  2535.  0Ch    WORD    handle for use with MAC driver's private interface (filled in
  2536.         by MAC driver)
  2537.  0Eh    WORD    context
  2538.  10h    WORD    approximate speed in KB/sec (filled in by MAC driver)
  2539.  12h    WORD    approximate cost in cents per hour (filled in by MAC driver)
  2540.  14h    WORD    maximum packet size in bytes (filled in by MAC driver)
  2541.  16h    WORD    addressing format (filled in by MAC driver)
  2542.         0000h general addressing
  2543.         0001h Ethernet addressing
  2544.         0002h Token Ring addressing
  2545.         0003h Token Bus addressing
  2546.  18h    DWORD    Send entry point (filled in by MAC driver)
  2547.  1Ch    DWORD    RegisterEventHandler entry point (filled in by MAC driver)
  2548.  20h    DWORD    SetPacketFilter entry point (filled in by MAC driver)
  2549.  24h    DWORD    UnBind entry point (filled in by MAC driver)
  2550.  
  2551. Format of parameter block for function 45h:
  2552. Offset    Size    Description
  2553.  00h    WORD    number of times output is attempted before driver assumes
  2554.         device is busy
  2555.  
  2556. Format of parameter block for functions 4Ah and 6Ah:
  2557. Offset    Size    Description
  2558.  00h    WORD    length of data
  2559.  02h    WORD    code page ID
  2560.  04h 2N BYTEs    DCBS (double byte character set) lead byte range
  2561.           start/end for each of N ranges (DOS 4.0)
  2562.     WORD    0000h  end of data (DOS 4.0)
  2563.  
  2564. Format of parameter block for function 4Ch:
  2565. Offset    Size    Description
  2566.  00h    WORD    flags
  2567.         DISPLAY.SYS = 0000h
  2568.         PRINTER.SYS bit 0 clear to prepare downloaded font, set to
  2569.             prepare cartridge selection
  2570.  02h    WORD    length of remainder of parameter block
  2571.  04h    WORD    number of code pages following
  2572.  06h  N WORDs    code page 1,...,N
  2573.  
  2574. Format of parameter block for function 4Dh:
  2575. Offset    Size    Description
  2576.  00h    WORD    length of data
  2577.  02h    WORD    code page ID
  2578.  
  2579. Format of parameter block for functions 5Fh and 7Fh:
  2580. Offset    Size    Description
  2581.  00h    BYTE    level (0 for DOS 4.x-6.0)
  2582.  01h    BYTE    reserved (0)
  2583.  02h    WORD    length of following data (14)
  2584.  04h    WORD    control flags
  2585.           bit 0 set for blink, clear for intensity
  2586.           bits 1 to 15 reserved
  2587.  06h    BYTE    mode type (1=text, 2=graphics)
  2588.  07h    BYTE    reserved (0)
  2589.  08h    WORD    colors
  2590.            0 = monochrome
  2591.            else N bits per pixel
  2592.  0Ah    WORD    pixel columns
  2593.  0Ch    WORD    pixel rows
  2594.  0Eh    WORD    character columns
  2595.  10h    WORD    character rows
  2596.  
  2597. Format of parameter block for function 6Bh:
  2598. Offset    Size    Description
  2599.  00h    WORD    length of following data
  2600.  02h    WORD    number of hardware code pages
  2601.  04h  N WORDs    hardware code pages 1,...,N
  2602.     WORD    number of prepared code pages
  2603.       N WORDs    prepared code pages 1,...,N
  2604. --------d-21440C-----------------------------
  2605. INT 21 - Greg Shenaut ASPITAPE.SYS - INTERFACE
  2606.     AX = 440Ch
  2607.     BX = device handle
  2608.     CH = category code
  2609.         07h tape (ASPITAPE.SYS)
  2610.     CL = function
  2611.         01h "mtop" - perform tape operation
  2612.         02h "mtget" - get tape status
  2613.         03h ignore end-of-tape errors
  2614.         04h enable end-of-tape errors
  2615.     DS:DX -> parameter block (see below)
  2616. Return: CF set on error
  2617.         AX = error code (see AH=59h)
  2618.     CF clear if successful
  2619.         DS:DX -> data block
  2620. Notes:    This device driver is a simple DOS interface to the Adaptec Advanced
  2621.       SCSI Programming Interface (ASPI).  It provides the following device
  2622.       names as access to the SCSI tape, 'RMTx' (rewind on close) and
  2623.       'NRMTx' (NO rewind on close) where x can go from 0 to 3.  There may
  2624.       also be the following names 'MTx' and 'NMTx' which default to 1024
  2625.       byte blocks.    The names may also have a '$' appended to try and make
  2626.       them unique from file names of 'RMT0' etc.
  2627.     once opend these devices must be put into RAW mode
  2628. SeeAlso: AX=4402h"ASPI"
  2629.  
  2630. Format of mtop parameter block:
  2631. Offset    Size    Description
  2632.  00h    WORD    operation code
  2633.         00h "MTWEOF" - write an end-of-file record
  2634.         01h "MTFSF" - forward space file
  2635.         02h "MTBSF" - backward space file
  2636.         03h "MTFSR" - forward space record
  2637.         04h "MTBSR" - backward space record
  2638.         05h "MTREW" - rewind
  2639.         06h "MTOFFL" - rewind and unload
  2640.         07h "MTNOP" - perform TEST UNIT READY
  2641.  02h    DWORD    repetition count
  2642.  
  2643. Format of mtget parameter block:
  2644. Offset    Size    Description
  2645.  00h    BYTE    ASPI host ID
  2646.  01h    BYTE    SCSI target ID
  2647.  02h    BYTE    SCSI logical unit number
  2648.  03h    BYTE    device parameters
  2649.         bit 0: drive must use fixed-block read and write
  2650.         bit 7: drive is an ASPI device
  2651.  04h    BYTE    current device state (see below)
  2652.  05h    BYTE    unit number within driver
  2653.  06h    WORD    fixed block blocksize
  2654.  08h    BYTE    last SCSI status
  2655.  09h    BYTE    last SCSI sense key
  2656.  0Ah    WORD    last SCSI opcode (packed)
  2657.         bits 0-7: SCSI operation (SCSI packet byte 0)
  2658.         bits 8-10: SCSI flags (SCSI packet byte 1)
  2659.         bits 11-12: ASPI "Direction Bits" (ASPI SRB byte 3)
  2660.  0Ch    WORD    residual bytes from SCSI opcode
  2661.  
  2662. Bitfields for current device state:
  2663.  bit 0    device currently opened in buffered mode
  2664.  bit 1    drive currently opened in nonbuffered mode
  2665.  bit 2    rewind drive on last close
  2666.  bit 3    drive has been written on
  2667.  bit 4    drive has been read from
  2668.  bit 5    next read will return 0 bytes
  2669.  bit 6    EOM will resemble EOF
  2670.  bit 7    drive may be busy rewinding
  2671. --------D-21440D-----------------------------
  2672. INT 21 - DOS 3.2+ - IOCTL - GENERIC BLOCK DEVICE REQUEST
  2673.     AX = 440Dh
  2674.     BL = drive number (00h=default,01h=A:,etc)
  2675.     CH = category code
  2676.         08h disk drive
  2677.         00h-7Fh reserved for Microsoft
  2678.         80h-FFh reserved for OEM/user-defined
  2679.     CL = minor code (function) (see below)
  2680.     DS:DX -> (DOS) parameter block (see below)
  2681.     SI:DI -> (OS/2 comp box) parameter block (see below)
  2682. Return: CF set on error
  2683.         AX = error code (01h,02h) (see AH=59h)
  2684.     CF clear if successful
  2685.         DS:DX -> data block if CL=60h or CL=61h
  2686. Notes:    DOS 4.01 seems to ignore the high byte of the number of directory
  2687.       entries in the BPB for diskettes.
  2688.     functions 46h and 66h undocumented in DOS 4.x, documented for DOS 5+
  2689.     the DUBLDISK.SYS v2.6 driver only supports minor codes 60h and 67h
  2690.     DR-DOS 3.41-6.0 only support minor codes 40h-42h and 60h-62h; all
  2691.       other minor codes return error code 16h
  2692. SeeAlso: AX=440Ch,AH=69h,INT 2F/AX=0802h,INT 2F/AX=122Bh
  2693.  
  2694. Values for minor code:
  2695.  00h    (OS/2)    \ used to lock/unlock a drive
  2696.  01h    (OS/2)    /
  2697.  40h    set device parameters
  2698.  41h    write logical device track
  2699.  42h    format and verify logical device track
  2700.  46h    (DOS 4+) set volume serial number (see also AH=69h)
  2701.  47h    (DOS 4+) set access flag
  2702.  50h    (PCMCIA) attribute memory write
  2703.  51h    (PCMCIA) common memory write
  2704.  52h    (PCMCIA) force media change
  2705.  53h    (PCMCIA) erase drive
  2706.  54h    (PCMCIA) erase media
  2707.  56h    (PCMCIA) set erase status callback
  2708.  57h    (PCMCIA) append Card Information Structure (CIS) tuple
  2709.  58h    (PCMCIA) erase CIS tuples
  2710.  60h    get device parameters
  2711.  61h    read logical device track
  2712.  62h    verify logical device track
  2713.  66h    (DOS 4+) get volume serial number (see also AH=69h)
  2714.  67h    (DOS 4+) get access flag
  2715.  68h    (DOS 5+) sense media type
  2716.  70h    (PCMCIA) attribute memory read
  2717.  73h    (PCMCIA) get memory media information
  2718.  76h    (PCMCIA) get erase status callback
  2719.  77h    (PCMCIA) get first Card Information Structure (CIS) tuple
  2720.  78h    (PCMCIA) get next CIS tuple
  2721.  
  2722. Format of parameter block for functions 40h, 60h:
  2723. Offset    Size    Description
  2724.  00h    BYTE    special functions
  2725.         bit 0 set if function to use current BPB, clear if Device
  2726.             BIOS Parameter Block field contains new default BPB
  2727.         bit 1 set if function to use track layout fields only
  2728.             must be clear if CL=60h
  2729.         bit 2 set if all sectors in track same size (should be set)
  2730.         bits 3-7 reserved
  2731.  01h    BYTE    device type (see below)
  2732.  02h    WORD    device attributes
  2733.         bit 0 set if nonremovable medium
  2734.         bit 1 set if door lock ("changeline") supported
  2735.         bits 2-15 reserved
  2736.  04h    WORD    number of cylinders
  2737.  06h    BYTE    media type
  2738.         for 1.2M drive
  2739.             00h 1.2M disk (default)
  2740.             01h 320K/360K disk
  2741.         F8h for DUBLDISK.SYS v2.6 expanded drives
  2742.         always 00h for other drive types
  2743.  07h 31 BYTEs    device BPB (see AH=53h), bytes after BPB offset 1Eh omitted
  2744. ---function 40h only---
  2745.  26h    WORD    number of sectors per track (start of track layout field)
  2746.         max 63
  2747.  28h  N word pairs: number,size of each sector in track
  2748.  
  2749. Values for device type:
  2750.  00h    320K/360K disk
  2751.  01h    1.2M disk
  2752.  02h    720K disk
  2753.  03h    single-density 8-inch disk
  2754.  04h    double-density 8-inch disk
  2755.  05h    fixed disk
  2756.  06h    tape drive
  2757.  07h    (DOS 3.3+) other type of block device, normally 1.44M floppy
  2758.  08h    read/write optical disk
  2759.  09h    (DOS 5+) 2.88M floppy
  2760.  
  2761. Format of parameter block for functions 41h, 61h:
  2762. Offset    Size    Description
  2763.  00h    BYTE    special functions (reserved, must be zero)
  2764.  01h    WORD    number of disk head
  2765.  03h    WORD    number of disk cylinder
  2766.  05h    WORD    number of first sector to read/write
  2767.  07h    WORD    number of sectors
  2768.  09h    DWORD    transfer address
  2769.  
  2770. Format of parameter block for function 42h:
  2771. Offset    Size    Description
  2772.  00h    BYTE    reserved, must be zero (DOS <3.2)
  2773.           bit 0=0: format/verify track
  2774.             1: format status call (DOS 3.2+), don't actually format
  2775.           bits 1-7 reserved, must be zero
  2776.         on return (DOS 4.x):
  2777.           bit 0: set if specified tracks, sectors/track supported
  2778.           bit 1: set if function not supported by BIOS
  2779.           bit 2: set if specified tracks, sectors/track not supported
  2780.           bit 3: set if no disk in drive
  2781.  01h    WORD    number of disk head
  2782.  03h    WORD    number of disk cylinder
  2783.  
  2784. Format of parameter block for function 62h:
  2785. Offset    Size    Description
  2786.  00h    BYTE    reserved, must be zero (DOS <3.2)
  2787.           bit 0=0: verify single track
  2788.             1: verify multiple tracks
  2789.           bits 1-7 reserved, must be zero
  2790.         on return (DOS 4.x):
  2791.           bit 0: set if specified tracks, sectors/track supported
  2792.           bit 1: set if function not supported by BIOS
  2793.           bit 2: set if specified tracks, sectors/track not supported
  2794.           bit 3: set if no disk in drive
  2795.  01h    WORD    number of disk head
  2796.  03h    WORD    number of disk cylinder
  2797.  05h    WORD    number of tracks to verify (equivalent to 255 or fewer sectors)
  2798.  
  2799. Format of parameter block for functions 46h, 66h:
  2800. Offset    Size    Description
  2801.  00h    WORD    (call) info level (should be 0000h)
  2802.  02h    DWORD    disk serial number (binary)
  2803.  06h 11 BYTEs    volume label or "NO NAME    "
  2804.  11h  8 BYTEs    filesystem type "FAT12     " or "FAT16   " (CL=66h only)
  2805.  
  2806. Format of parameter block for functions 47h, 67h:
  2807. Offset    Size    Description
  2808.  00h    BYTE    special-function field (must be zero)
  2809.  01h    BYTE    disk-access flag, nonzero if access allowed by driver
  2810.  
  2811. Format of parameter block for function 68h:
  2812. Offset    Size    Description
  2813.  00h    BYTE    01h for default media type, 00h for any other media type
  2814.         (see also INT 13/AH=20h)
  2815.  01h    BYTE    02h for 720K, 07h for 1.44M, 09h for 2.88M
  2816. --------D-21440E-----------------------------
  2817. INT 21 - DOS 3.2+ - IOCTL - GET LOGICAL DRIVE MAP
  2818.     AX = 440Eh
  2819.     BL = drive number (00h=default,01h=A:,etc)
  2820. Return: CF set on error
  2821.         AX = error code (01h,0Fh) (see AH=59h)
  2822.     CF clear if successful
  2823.         AL = 00h block device has only one logical drive assigned
  2824.          1..26 the last letter used to reference the drive (1=A:,etc)
  2825. Note:    DR-DOS 3.41-5.0 DRIVER.SYS does not support drive mapping and thus
  2826.       always returns AL=00h
  2827. SeeAlso: AX=440Fh,INT 2F/AX=122Bh
  2828. --------D-21440F-----------------------------
  2829. INT 21 - DOS 3.2+ - IOCTL - SET LOGICAL DRIVE MAP
  2830.     AX = 440Fh
  2831.     BL = physical drive number (00h=default,01h=A:,etc))
  2832. Return: CF set on error
  2833.         AX = error code (01h,0Fh) (see AH=59h)
  2834.     CF clear if successful
  2835.         drive now responds to next logical drive number
  2836. Notes:    maps logical drives to physical drives, similar to DOS's treatment of
  2837.       a single physical floppy drive as both A: and B:
  2838.     DR-DOS 3.41-5.0 DRIVER.SYS does not support drive mapping and thus
  2839.       always returns an error on this function
  2840. SeeAlso: AX=440Eh,INT 2F/AX=122Bh
  2841. --------D-214410-----------------------------
  2842. INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (HANDLE)
  2843.     AX = 4410h
  2844.     BX = handle for device
  2845.     CH = category code (see AX=440Ch)
  2846.     CL = function code
  2847. Return: CF clear if successful
  2848.         AX = 0000h    specified IOCTL function is supported
  2849.     CF set on error
  2850.         AL = 01h    IOCTL capability not available
  2851. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  2852.       standard DOS 3.2 set may use this call first to see whether a
  2853.       particular call is supported
  2854. SeeAlso: AX=440Ch,AX=440Dh,AX=4411h
  2855. --------d-214410BXFFFF-----------------------
  2856. INT 21 U - NewSpace - ENABLE DRIVER
  2857.     AX = 4410h
  2858.     BX = FFFFh
  2859. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  2860.       all files as they are written and decompresses them as they are read
  2861. Note:    compressed files are not accessible unless the driver is enabled
  2862. SeeAlso: AX=4411h/BX=FFFFh
  2863. --------D-214411-----------------------------
  2864. INT 21 - DOS 5+ - IOCTL - QUERY GENERIC IOCTL CAPABILITY (DRIVE)
  2865.     AX = 4411h
  2866.     BL = drive number
  2867.     CH = category code (see AX=440Dh)
  2868.     CL = function code
  2869. Return: CF clear if successful
  2870.         AX = 0000h    specified IOCTL function is supported
  2871.     CF set on error
  2872.         AL = 01h    IOCTL capability not available
  2873. Note:    a program which wishes to use Generic IOCTL calls beyond those in the
  2874.       standard DOS 3.2 set may use this call first to see whether a
  2875.       particular call is supported
  2876. SeeAlso: AX=440Ch,AX=440Dh,AX=4410h
  2877. --------d-214411BXFFFF-----------------------
  2878. INT 21 U - NewSpace - DISABLE DRIVER
  2879.     AX = 4411h
  2880.     BX = FFFFh
  2881. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  2882.       all files as they are written and decompresses them as they are read
  2883. Note:    compressed files are not accessible unless the driver is enabled
  2884. SeeAlso: AX=4410h/BX=FFFFh
  2885. --------O-214412-----------------------------
  2886. INT 21 - DR-DOS 5+ - DETERMINE DOS TYPE
  2887.     AX = 4412h
  2888.     CF set
  2889. Return: CF set if not DR-DOS
  2890.         AX = error code (see AH=59h)
  2891.     CF clear if DR-DOS
  2892.         DX = AX = version code (see AX=4452h)
  2893. Note:    this obsolete call which will not be supported in future versions of
  2894.       DR-DOS is identical to AX=4452h
  2895. SeeAlso: AX=4452h
  2896. --------d-214412BXFFFF-----------------------
  2897. INT 21 U - NewSpace - INSTALLATION CHECK???
  2898.     AX = 4412h
  2899.     BX = FFFFh
  2900. Return: AX = PSP segment of NewRes (resident driver for NewSpace)
  2901.     BX:DX -> ???
  2902.     CX = ???
  2903. SeeAlso: AX=4411h/BX=FFFFh
  2904. --------d-214413BXFFFF-----------------------
  2905. INT 21 U - NewSpace - GET ???
  2906.     AX = 4413h
  2907.     BX = FFFFh
  2908. Return: AX = code segment of NewRes (resident driver for NewSpace)
  2909.     BX = offset of ???
  2910. SeeAlso: AX=4412h/BX=FFFFh
  2911. --------O-214414-----------------------------
  2912. INT 21 U - DR-DOS 5.0 - SET GLOBAL PASSWORD
  2913.     AX = 4414h
  2914.     DS:DX -> password string (blank-padded to 8 characters)
  2915. Desc:    Specify the master password for accessing files.
  2916. Note:    this obsolete call which will not be supported in future versions of
  2917.       DR-DOS is identical to AX=4452h
  2918. SeeAlso: AX=4454h
  2919. --------d-214414BXFFFF-----------------------
  2920. INT 21 U - NewSpace - DEBUGGING DUMP
  2921.     AX = 4414h
  2922.     BX = FFFFh
  2923. Return: debugging dump written to X:\NEWSPACE.SMP
  2924. SeeAlso: AX=4413h/BX=FFFFh,AX=44FFh/BX=FFFFh
  2925. --------O-2144-------------------------------
  2926. INT 21 U - DR-DOS 5.0 - HISTORY BUFFER, SHARE, AND HILOAD CONTROL
  2927.     AH = 44h
  2928.     AL = 16h to 18h
  2929. Note:    these obsolete subfunctions (which will not be supported in future
  2930.       versions of DR-DOS) are identical to AX=4456h through 4458h
  2931. SeeAlso: AX=4456h,AX=4457h,AX=4458h
  2932. --------O-214451-----------------------------
  2933. INT 21 - Concurrent DOS v3.2+ - INSTALLATION CHECK
  2934.     AX = 4451h
  2935. Return: CF set if not Concurrent DOS
  2936.         AX = error code (see AH=59h)
  2937.     CF clear if successful
  2938.         AH = single-user/multiuser nature
  2939.         10h single-user
  2940.             AL = operating system version ID (see AX=4452h)
  2941.         14h multiuser
  2942.             AL = operating system version ID (see below)
  2943. Notes:    as of Concurrent DOS/XM 5.0 (possibly earlier), the version is stored
  2944.       in the environment variable VER
  2945.     use this function if you are looking for multiuser capabilities,
  2946.       AX=4452h for single-user
  2947.     this function should never return the single-user values
  2948. SeeAlso: AX=4452h,AX=4459h
  2949.  
  2950. Values for operating system version ID:
  2951.  32h    Concurrent PC DOS 3.2
  2952.  41h    Concurrent DOS 4.1
  2953.  50h    Concurrent DOS/XM 5.0 or Concurrent DOS/386 1.1
  2954.  60h    Concurrent DOS/XM 6.0 or Concurrent DOS/386 2.0
  2955.  62h    Concurrent DOS/XM 6.2 or Concurrent DOS/386 3.0
  2956.  66h    DR Multiuser DOS 5.1
  2957.  67h    Concurrent DOS 5.1
  2958. --------O-214452-----------------------------
  2959. INT 21 - DR-DOS 3.41+ - DETERMINE DOS TYPE/GET DR-DOS VERSION
  2960.     AX = 4452h ("DR")
  2961.     CF set
  2962. Return: CF set if not DR-DOS
  2963.         AX = error code (see AH=59h)
  2964.     CF clear if DR-DOS
  2965.         DX = AX = version code
  2966.         AH = single-user/multiuser nature
  2967.         10h single-user
  2968.             AL = operating system version ID (see below)
  2969.         14h multiuser
  2970.             AL = operating system version ID (see AX=4451h)
  2971. Notes:    the DR-DOS version is stored in the environment variable VER
  2972.     use this function if looking for single-user capabilities, AX=4451h
  2973.       if looking for multiuser; this call should never return multiuser
  2974.       values
  2975. SeeAlso: AX=4412h,AX=4451h,AX=4459h
  2976.  
  2977. Values for operating system version ID:
  2978.  60h    DOS Plus
  2979.  63h    DR-DOS 3.41
  2980.  64h    DR-DOS 3.42
  2981.  65h    DR-DOS 5.00
  2982.  67h    DR-DOS 6.00
  2983.  70h    PalmDOS
  2984.  71h    DR-DOS 6.0 March 1993 "business update"
  2985.  72h    Novell DOS 7.0
  2986. --------O-214454-----------------------------
  2987. INT 21 U - DR-DOS 3.41+ - SET GLOBAL PASSWORD
  2988.     AX = 4454h
  2989.     DS:DX -> password string (blank-padded to 8 characters)
  2990. Desc:    Specify the master password for accessing files.
  2991. SeeAlso: AX=4303h,AX=4414h
  2992. --------O-214456-----------------------------
  2993. INT 21 U - DR-DOS 5.0+ - HISTORY BUFFER CONTROL
  2994.     AX = 4456h
  2995.     DL = flag
  2996.         bit 0: 1 = COMMAND.COM history buffers
  2997.            0 = set to application
  2998. Return: AL = ??? (20h if DL bit 0 set, A0h if clear (DR-DOS 6.0))
  2999. Note:    This was seen called by COMMAND.COM of DR-DOS 6.0
  3000. --------O-214457-----------------------------
  3001. INT 21 U - DR-DOS 5.0+ - SHARE/HILOAD CONTROL
  3002.     AX = 4457h
  3003.     DH = subfunction
  3004.         00h enable/disable SHARE
  3005.         DL = 00h disable
  3006.            = 01h enable
  3007.            else Return: AX = ???
  3008.         01h get HILOAD status
  3009.         Return: AX = status
  3010.                 0000h off
  3011.                 0001h on
  3012.         02h set HILOAD status
  3013.         DL = new state (00h off, 01h on)
  3014.         Return: AX = ???
  3015.         other
  3016.         Return: AX = ???
  3017. Note:    This was seen called by COMMAND.COM of DR-DOS 6.0
  3018. SeeAlso: AX=4457h/DX=FFFFh
  3019. --------O-214457DXFFFF-----------------------
  3020. INT 21 U - DR-DOS 6.0 - GET SHARE STATUS
  3021.     AX = 4457h
  3022.     DX = FFFFh
  3023. Return: AX = SHARE status
  3024. SeeAlso: INT 2F/AX=1000h
  3025. --------O-214458-----------------------------
  3026. INT 21 U - DR-DOS 5.0+ internal - GET POINTER TO INTERNAL VARIABLE TABLE
  3027.     AX = 4458h
  3028. Return: ES:BX -> internal variable table (see below)
  3029.     AX = ??? (0B50h for DR-DOS 5.0, 0A56h for DR-DOS 6.0)
  3030. SeeAlso: AX=4452h
  3031.  
  3032. Format of internal variable table:
  3033. Offset    Size    Description
  3034.  00h    DWORD    pointer to ???
  3035.  04h  7 BYTEs    ???
  3036.  0Bh    WORD    KB of extended memory at startup
  3037.  0Dh    BYTE    number of far jump entry points
  3038.  0Eh    WORD    segment containing far jumps to DR-DOS entry points (see below)
  3039. ---DR-DOS 6.0---
  3040.  10h    WORD    (only if kernel loaded in HMA) offset in HMA of first free HMA
  3041.         memory block (see below) or 0000h if none; segment is FFFFh
  3042.  12h    WORD    pointer to segment of environment variables set in CONFIG,
  3043.         or 0000h if already used
  3044.  14h    WORD    (only if kernel loaded in HMA) offset in HMA of first used HMA
  3045.         memory block (see below) or 0000h if none; segment is FFFFh
  3046. Note:    the segment used for the DR-DOS 6.0 CONFIG environment variables
  3047.       (excluding COMSPEC, VER and OS) is only useful for programs/drivers
  3048.       called from CONFIG.SYS. The word is set to zero later and the area
  3049.       lost.
  3050.  
  3051. Format of kernel entry jump table for DR-DOS 5.0-6.0:
  3052. Offset    Size    Description
  3053.  00h  5 BYTEs    far jump to kernel entry point for CP/M CALL 5
  3054.  05h  5 BYTEs    far jump to kernel entry point for INT 20
  3055.  0Ah  5 BYTEs    far jump to kernel entry point for INT 21
  3056.  0Fh  5 BYTEs    far jump to kernel entry point for INT 22??? (RETF)
  3057.  14h  5 BYTEs    far jump to kernel entry point for INT 23??? (RETF)
  3058.  19h  5 BYTEs    far jump to kernel entry point for INT 24
  3059.  1Eh  5 BYTEs    far jump to kernel entry point for INT 25
  3060.  23h  5 BYTEs    far jump to kernel entry point for INT 26
  3061.  28h  5 BYTEs    far jump to kernel entry point for INT 27
  3062.  2Dh  5 BYTEs    far jump to kernel entry point for INT 28
  3063.  32h  5 BYTEs    far jump to kernel entry point for INT 2A (IRET)
  3064.  37h  5 BYTEs    far jump to kernel entry point for INT 2B (IRET)
  3065.  3Ch  5 BYTEs    far jump to kernel entry point for INT 2C (IRET)
  3066.  41h  5 BYTEs    far jump to kernel entry point for INT 2D (IRET)
  3067.  46h  5 BYTEs    far jump to kernel entry point for INT 2E (IRET)
  3068.  4Bh  5 BYTEs    far jump to kernel entry point for INT 2F
  3069. Note:    all of these entry points are indirected through this jump table
  3070.       to allow the kernel to be relocated into high memory while leaving
  3071.       the actual entry addresses in low memory for maximum compatibility
  3072.  
  3073. Format of HMA Memory Block (DR-DOS 6.0 kernel loaded in HMA):
  3074. Offset    Size    Description
  3075.  00h    WORD    offset of next HMA Memory Block (0000h if last block)
  3076.  02h    WORD    size of this block in bytes (at least 10h)
  3077.  04h    BYTE    type of HMA Memory Block (interpreted by MEM)
  3078.         00h system
  3079.         01h KEYB
  3080.         02h NLSFUNC
  3081.         03h SHARE
  3082.         04h TaskMAX
  3083.         05h COMMAND
  3084.  05h    var    TSR (or system) code and data. DR-DOS TSR's, such as KEYB,
  3085.         hooks interrupts using segment FFFEh instead FFFFh.
  3086. --------O-214459-----------------------------
  3087. INT 21 - DR MultiUser DOS 5.0 - API
  3088.     AX = 4459h
  3089.     CL = function (see INT E0"CP/M")
  3090.     DS,DX = parameters
  3091. Notes:    DR-DOS 5.0 returns CF set and AX=0001h
  3092.     this API is also available on INT E0
  3093. SeeAlso: AX=4452h,INT E0"CP/M"
  3094. --------d-2144FFBXFFFF-----------------------
  3095. INT 21 U - NewSpace - ???
  3096.     AX = 44FFh
  3097.     BX = FFFFh
  3098.     DX = ???
  3099. Program: NewSpace is a TSR by Isogon Corporation which automatically compresses
  3100.       all files as they are written and decompresses them as they are read
  3101. SeeAlso: AX=4414h/BX=FFFFh
  3102. --------D-2145-------------------------------
  3103. INT 21 - DOS 2+ - "DUP" - DUPLICATE FILE HANDLE
  3104.     AH = 45h
  3105.     BX = file handle
  3106. Return: CF clear if successful
  3107.         AX = new handle
  3108.     CF set on error
  3109.         AX = error code (04h,06h) (see AH=59h)
  3110. Notes:    moving file pointer for either handle will also move it for the other,
  3111.       because both will refer to the same system file table
  3112.     for DOS versions prior to 3.3, file writes may be forced to disk by
  3113.       duplicating the file handle and closing the duplicate
  3114. SeeAlso: AH=3Dh,AH=46h
  3115. --------D-2146-------------------------------
  3116. INT 21 - DOS 2+ - "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE
  3117.     AH = 46h
  3118.     BX = file handle
  3119.     CX = file handle to become duplicate of first handle
  3120. Return: CF clear if successful
  3121.     CF set on error
  3122.         AX = error code (04h,06h) (see AH=59h)
  3123. Notes:    closes file with handle CX if it is still open
  3124.     DOS 3.30 hangs if BX=CX on entry
  3125.     moving file pointer for either handle will also move it for the other,
  3126.       because both will refer to the same system file table
  3127. SeeAlso: AH=3Dh,AH=45h
  3128. --------D-2147-------------------------------
  3129. INT 21 - DOS 2+ - "CWD" - GET CURRENT DIRECTORY
  3130.     AH = 47h
  3131.     DL = drive number (00h = default, 01h = A:, etc)
  3132.     DS:SI -> 64-byte buffer for ASCIZ pathname
  3133. Return: CF clear if successful
  3134.         AX = 0100h (undocumented)
  3135.     CF set on error
  3136.         AX = error code (0Fh) (see AH=59h)
  3137. Notes:    the returned path does not include a drive or the initial backslash
  3138.     many Microsoft products for Windows rely on AX being 0100h on success
  3139.     under the FlashTek X-32 DOS extender, the buffer pointer is in DS:ESI
  3140. SeeAlso: AH=19h,AH=3Bh,INT 15/AX=DE25h
  3141. --------D-2148-------------------------------
  3142. INT 21 - DOS 2+ - ALLOCATE MEMORY
  3143.     AH = 48h
  3144.     BX = number of paragraphs to allocate
  3145. Return: CF clear if successful
  3146.         AX = segment of allocated block
  3147.     CF set on error
  3148.         AX = error code (07h,08h) (see AH=59h)
  3149.         BX = size of largest available block
  3150. Notes:    DOS 2.1-6.0 coalesces free blocks while scanning for a block to
  3151.       allocate
  3152.     .COM programs are initially allocated the largest available memory
  3153.       block, and should free some memory with AH=49h before attempting any
  3154.       allocations
  3155.     under the FlashTek X-32 DOS extender, EBX contains a protected-mode
  3156.       near pointer to the allocated block on a successful return
  3157. SeeAlso: AH=49h,AH=4Ah,AH=58h,AH=83h
  3158. --------D-2149-------------------------------
  3159. INT 21 - DOS 2+ - FREE MEMORY
  3160.     AH = 49h
  3161.     ES = segment of block to free
  3162. Return: CF clear if successful
  3163.     CF set on error
  3164.         AX = error code (07h,09h) (see AH=59h)
  3165. Notes:    apparently never returns an error 07h, despite official docs; DOS 3.30
  3166.       code contains only an error 09h exit
  3167.     DOS 2.1-6.0 does not coalesce adjacent free blocks when a block is
  3168.       freed, only when a block is allocated or resized
  3169.     the code for this function is identical in DOS 2.1-6.0 except for
  3170.       calls to start/end a critical section in DOS 3+
  3171. SeeAlso: AH=48h,AH=4Ah
  3172. --------D-214A-------------------------------
  3173. INT 21 - DOS 2+ - RESIZE MEMORY BLOCK
  3174.     AH = 4Ah
  3175.     BX = new size in paragraphs
  3176.     ES = segment of block to resize
  3177. Return: CF clear if successful
  3178.     CF set on error
  3179.         AX = error code (07h,08h,09h) (see AH=59h)
  3180.         BX = maximum paragraphs available for specified memory block
  3181. Notes:    under DOS 2.1-5.0, if there is insufficient memory to expand the block
  3182.       as much as requested, the block will be made as large as possible
  3183.     DOS 2.1-5.0 coalesces any free blocks immediately following the block
  3184.       to be resized
  3185. SeeAlso: AH=48h,AH=49h,AH=83h
  3186. --------D-214B-------------------------------
  3187. INT 21 - DOS 2+ - "EXEC" - LOAD AND/OR EXECUTE PROGRAM
  3188.     AH = 4Bh
  3189.     AL = type of load
  3190.         00h load and execute
  3191.         01h load but do not execute
  3192.         03h load overlay
  3193.         04h load and execute in background (European MS-DOS 4.0 only)
  3194.         "Exec & Go" (see also AH=80h)
  3195.     DS:DX -> ASCIZ program name (must include extension)
  3196.     ES:BX -> parameter block (see below)
  3197.     CX = mode (subfunction 04h only)
  3198.         0000h child placed in zombie mode after termination
  3199.         0001h child's return code discarded on termination
  3200. Return: CF clear if successful
  3201.         BX,DX destroyed
  3202.         if subfunction 01h, process ID set to new program's PSP; get with
  3203.         INT 21/AH=62h
  3204.     CF set on error
  3205.         AX = error code (01h,02h,05h,08h,0Ah,0Bh) (see AH=59h)
  3206. Notes:    DOS 2.x destroys all registers, including SS:SP
  3207.     under ROM-based DOS, if no disk path characters (colons or slashes)
  3208.       are included in the program name, the name is searched for in the
  3209.       ROM module headers (see below) before searching on disk
  3210.     for functions 00h and 01h, the calling process must ensure that there
  3211.       is enough unallocated memory available; if necessary, by releasing
  3212.       memory with AH=49h or AH=4Ah
  3213.     for function 01h, the AX value to be passed to the child program is put
  3214.       on top of the child's stack
  3215.     for function 03h, DOS assumes that the overlay is being loaded into
  3216.       memory allocated by the caller
  3217.     function 01h was undocumented prior to the release of DOS 5.0
  3218.     some versions (such as DR-DOS 6.0) check the parameters and parameter
  3219.       block and return an error if an invalid value (such as an offset of
  3220.       FFFFh) is found
  3221.     background programs under European MS-DOS 4.0 must use the new
  3222.       executable format
  3223.     new executables begin running with the following register values
  3224.         AX = environment segment
  3225.         BX = offset of command tail in environment segment
  3226.         CX = size of automatic data segment (0000h = 64K)
  3227.         ES,BP = 0000h
  3228.         DS = automatic data segment
  3229.         SS:SP = initial stack
  3230.       the command tail corresponds to an old executable's PSP:0081h and
  3231.       following, except that the 0Dh is turned into a NUL (00h); new
  3232.       format executables have no PSP
  3233.     under the FlashTek X-32 DOS extender, only function 00h is supported
  3234.       and the pointers are passed in DS:EDX and ES:EBX
  3235.     DR-DOS 6 always loads .EXE-format programs with no fixups above the
  3236.       64K mark to avoid the EXEPACK bug
  3237.     names for the various executable type understood by various
  3238.       environments:
  3239.         MZ  old-style DOS executable
  3240.         NE  Windows or OS/2 1.x segmented ("new") executable
  3241.         LE  Windows virtual device driver (VxD) linear executable
  3242.         LX  variant of LE used in OS/2 2.x
  3243.         W3  Windows WIN386.EXE file; a collection of LE files
  3244.         PE  Win32 (Windows NT and Win32s) portable executable based on
  3245.             Unix COFF
  3246. BUGS:    DOS 2.00 assumes that DS points at the current program's PSP
  3247.     Load Overlay (subfunction 03h) loads up to 512 bytes too many if the
  3248.       file contains additional data after the actual overlay
  3249. SeeAlso: AX=4B05h,AH=4Ch,AH=4Dh,AH=64h"OS/2",AH=8Ah,INT 2E
  3250.  
  3251. Format of EXEC parameter block for AL=00h,01h,04h:
  3252. Offset    Size    Description
  3253.  00h    WORD    segment of environment to copy for child process (copy caller's
  3254.         environment if 0000h)
  3255.  02h    DWORD    pointer to command tail to be copied into child's PSP
  3256.  06h    DWORD    pointer to first FCB to be copied into child's PSP
  3257.  0Ah    DWORD    pointer to second FCB to be copied into child's PSP
  3258.  0Eh    DWORD    (AL=01h) will hold subprogram's initial SS:SP on return
  3259.  12h    DWORD    (AL=01h) will hold entry point (CS:IP) on return
  3260.  
  3261. Format of EXEC parameter block for AL=03h:
  3262. Offset    Size    Description
  3263.  00h    WORD    segment at which to load overlay
  3264.  02h    WORD    relocation factor to apply to overlay if in .EXE format
  3265.  
  3266. Format of EXEC parameter block for FlashTek X-32:
  3267. Offset    Size    Description
  3268.  00h    PWORD    48-bit far pointer to environment string
  3269.  06h    PWORD    48-bit far pointer to command tail string
  3270.  
  3271. Format of .EXE file header:
  3272. Offset    Size    Description
  3273.  00h  2 BYTEs    .EXE signature, either "MZ" or "ZM" (5A4Dh or 4D5Ah)
  3274.  02h    WORD    number of bytes in last 512-byte page of executable
  3275.  04h    WORD    total number of 512-byte pages in executable (includes any
  3276.         partial last page)
  3277.  06h    WORD    number of relocation entries
  3278.  08h    WORD    header size in paragraphs
  3279.  0Ah    WORD    minimum paragraphs of memory to allocation in addition to
  3280.         executable's size
  3281.  0Ch    WORD    maximum paragraphs to allocate in addition to executable's size
  3282.  0Eh    WORD    initial SS relative to start of executable
  3283.  10h    WORD    initial SP
  3284.  12h    WORD    checksum (one's complement of sum of all words in executable)
  3285.  14h    DWORD    initial CS:IP relative to start of executable
  3286.  18h    WORD    offset within header of relocation table
  3287.         40h or greater for new-format (NE,LE,LX,W3,PE,etc.) executable
  3288.  1Ah    WORD    overlay number (normally 0000h = main program)
  3289. ---new executable---
  3290.  1Ch  4 BYTEs    ???
  3291.  20h    WORD    behavior bits
  3292.  22h 26 BYTEs    reserved for additional behavior info
  3293.  3Ch    DWORD    offset of new executable (NE,LE,etc) header within disk file,
  3294.         or 00000000h if plain MZ executable
  3295. ---Borland TLINK---
  3296.  1Ch  2 BYTEs    ??? (apparently always 01h 00h)
  3297.  1Eh    BYTE    signature FBh
  3298.  1Fh    BYTE    TLINK version (major in high nybble, minor in low nybble)
  3299.  20h  2 BYTEs    ??? (v2.0 apparently always 72h 6Ah, v3.0+ seems always 6Ah 72h)
  3300. ---ARJ self-extracting archive---
  3301.  1Ch  4 BYTEs    signature "RJSX" (older versions, new signature is "aRJsfX" in
  3302.         the first 1000 bytes of the file)
  3303. ---LZEXE 0.90 compressed executable---
  3304.  1Ch  4 BYTEs    signature "LZ09"
  3305. ---LZEXE 0.91 compressed executable---
  3306.  1Ch  4 BYTEs    signature "LZ91"
  3307. ---PKLITE compressed executable---
  3308.  1Ch    BYTE    minor version number
  3309.  1Dh    BYTE    bits 0-3: major version
  3310.         bit 4: extra compression
  3311.         bit 5: huge (multi-segment) file
  3312.  1Eh  6 BYTEs    signature "PKLITE" (followed by copyright message)
  3313. ---LHarc 1.x self-extracting archive---
  3314.  1Ch  4 BYTEs    unused???
  3315.  20h  3 BYTEs    jump to start of extraction code
  3316.  23h  2 BYTEs    ???
  3317.  25h 12 BYTEs    signature "LHarc's SFX "
  3318. ---LHA 2.x self-extracting archive---
  3319.  1Ch  8 BYTEs    ???
  3320.  24h 10 BYTEs    signature "LHa's SFX " (v2.10) or "LHA's SFX " (v2.13)
  3321. ---TopSpeed C 3.0 CRUNCH compressed file---
  3322.  1Ch    DWORD    018A0001h
  3323.  20h    WORD    1565h
  3324. ---PKARCK 3.5 self-extracting archive---
  3325.  1Ch    DWORD    00020001h
  3326.  20h    WORD    0700h
  3327. ---BSA (Soviet archiver) self-extracting archive---
  3328.  1Ch    WORD    000Fh
  3329.  1Eh    BYTE    A7h
  3330. ---LARC self-extracting archive---
  3331.  1Ch  4 BYTEs    ???
  3332.  20h 11 BYTEs    "SFX by LARC "
  3333. ---LH self-extracting archive---
  3334.  1Ch  8 BYTEs    ???
  3335.  24h  8 BYTEs    "LH's SFX "
  3336. ---other linkers---
  3337.  1Ch    var    optional information
  3338. ---
  3339.   N   N DWORDs    relocation items
  3340. Notes:    if word at offset 02h is 4, it should be treated as 00h, since pre-1.10
  3341.       versions of the MS linker set it that way
  3342.     if both minimum and maximum allocation (offset 0Ah/0Ch) are zero, the
  3343.       program is loaded as high in memory as possible
  3344.     the maximum allocation is set to FFFFh by default
  3345.  
  3346. Format of ROM Module Header:
  3347. Offset    Size    Description
  3348.  00h  2 BYTEs    ROM signature 55h, AAh
  3349.  02h    BYTE    size of ROM in 512-byte blocks
  3350.  03h  3 BYTEs    POST initialization entry point (near JMP instruction)
  3351.  06h    ROM Program Name List [array]
  3352.     Offset    Size    Description
  3353.      00h    BYTE    length of ROM program's name (00h if end of name list)
  3354.      01h  N BYTEs    program name
  3355.      N+1  3 BYTEs    program entry point (near JMP instruction)
  3356.  
  3357. Format of new executable header:
  3358. Offset    Size    Description
  3359.  00h  2 BYTEs    "NE" (4Eh 45h) signature
  3360.  02h  2 BYTEs    linker version (major, then minor)
  3361.  04h    WORD    offset from start of this header to entry table (see below)
  3362.  06h    WORD    length of entry table in bytes
  3363.  08h    DWORD    file load CRC (0 in Borland's TPW)
  3364.  0Ch    BYTE    program flags
  3365.         bits 0-1 DGROUP type
  3366.           0 = none
  3367.           1 = single shared
  3368.           2 = multiple (unshared)
  3369.           3 = (null)
  3370.         bit 2:    global initialization
  3371.         bit 3:    protected mode only
  3372.         bit 4:    8086 instructions
  3373.         bit 5:    80286 instructions
  3374.         bit 6:    80386 instructions
  3375.         bit 7:    80x87 instructions
  3376.  0Dh    BYTE    application flags
  3377.         bits 0-2: application type
  3378.             001 full screen (not aware of Windows/P.M. API)
  3379.             010 compatible with Windows/P.M. API
  3380.             011 uses Windows/P.M. API
  3381.         bit 3: is a Family Application (OS/2)
  3382.         bit 5: 0=executable, 1=errors in image
  3383.         bit 6: non-conforming program (valid stack is not maintained)
  3384.         bit 7: DLL or driver rather than application
  3385.             (SS:SP info invalid, CS:IP points at FAR init routine
  3386.              called with AX=module handle which returns AX=0000h
  3387.              on failure, AX nonzero on successful initialization)
  3388.  0Eh    WORD    auto data segment index
  3389.  10h    WORD    initial local heap size
  3390.  12h    WORD    initial stack size (added to data seg, 0000h if SS <> DS)
  3391.  14h    DWORD    program entry point (CS:IP), "CS" is index into segment table
  3392.  18h    DWORD    initial stack pointer (SS:SP), "SS" is segment index
  3393.         if SS=automatic data segment and SP=0000h, the stack pointer is
  3394.           set to the top of the automatic data segment, just below the
  3395.           local heap
  3396.  1Ch    WORD    segment count
  3397.  1Eh    WORD    module reference count
  3398.  20h    WORD    length of nonresident names table in bytes
  3399.  22h    WORD    offset from start of this header to segment table (see below)
  3400.  24h    WORD    offset from start of this header to resource table
  3401.  26h    WORD    offset from start of this header to resident names table
  3402.  28h    WORD    offset from start of this header to module reference table
  3403.  2Ah    WORD    offset from start of this header to imported names table
  3404.         (array of counted strings, terminated with a string of length
  3405.          00h)
  3406.  2Ch    DWORD    offset from start of file to nonresident names table
  3407.  30h    WORD    count of moveable entry point listed in entry table
  3408.  32h    WORD    file alignment size shift count
  3409.         0 is equivalent to 9 (default 512-byte pages)
  3410.  34h    WORD    number of resource table entries
  3411.  36h    BYTE    target operating system
  3412.         00h unknown
  3413.         01h OS/2
  3414.         02h Windows
  3415.         03h European MS-DOS 4.x
  3416.         04h Windows 386
  3417.         05h BOSS (Borland Operating System Services)
  3418.  37h    BYTE    other EXE flags
  3419.         bit 0: supports long filenames
  3420.         bit 1: 2.X protected mode
  3421.         bit 2: 2.X proportional font
  3422.         bit 3: gangload area
  3423.  38h    WORD    offset to return thunks or start of gangload area
  3424.  3Ah    WORD    offset to segment reference thunks or length of gangload area
  3425.  3Ch    WORD    minimum code swap area size
  3426.  3Eh  2 BYTEs    expected Windows version (minor version first)
  3427. Note:    this header is documented in detail in the Windows 3.1 SDK Programmer's
  3428.       Reference, Vol 4.
  3429.  
  3430. Format of Codeview trailer (at end of executable):
  3431. Offset    Size    Description
  3432.  00h    WORD    signature 4E42h ('NB')
  3433.  02h    WORD    Microsoft debug info version number
  3434.  04h    DWORD    Codeview header offset
  3435.  
  3436. Format of new executable segment table record:
  3437.  00h    WORD    offset in file (shift left by alignment shift to get byte offs)
  3438.  02h    WORD    length of image in file (0000h = 64K)
  3439.  04h    WORD    segment attributes (see below)
  3440.  06h    WORD    number of bytes to allocate for segment (0000h = 64K)
  3441. Note:    the first segment table entry is entry number 1
  3442.  
  3443. Bitfields for segment attributes:
  3444.  bit 0    data segment rather than code segment
  3445.  bit 1    unused???
  3446.  bit 2    real mode
  3447.  bit 3    iterated
  3448.  bit 4    movable
  3449.  bit 5    sharable
  3450.  bit 6    preloaded rather than demand-loaded
  3451.  bit 7    execute-only (code) or read-only (data)
  3452.  bit 8    relocations (directly following code for this segment)
  3453.  bit 9    debug info present
  3454.  bits 10,11    80286 DPL bits
  3455.  bit 12        discardable
  3456.  bits 13-15    discard priority
  3457.  
  3458. Format of new executable entry table item (list):
  3459. Offset    Size    Description
  3460.  00h    BYTE    number of entry points (00h if end of entry table list)
  3461.  01h    BYTE    segment number (00h if end of entry table list)
  3462.  02h 3N BYTEs    entry records
  3463.         Offset    Size    Description
  3464.          00h    BYTE    flags
  3465.                 bit 0: exported
  3466.                 bit 1: single data
  3467.                 bits 2-7: unused???
  3468.          01h    WORD    offset within segment
  3469.  
  3470. Format of new executable relocation data (immediately follows segment image):
  3471. Offset    Size    Description
  3472.  00h    WORD    number of relocation items
  3473.  02h 8N BYTEs    relocation items
  3474.         Offset    Size    Description
  3475.          00h    BYTE    relocation type
  3476.                 00h LOBYTE
  3477.                 02h BASE
  3478.                 03h PTR
  3479.                 05h OFFS
  3480.                 0Bh PTR48
  3481.                 0Dh OFFS32
  3482.          01h    BYTE    flags
  3483.                 bit 2: additive
  3484.          02h    WORD    offset within segment
  3485.          04h    WORD    target address segment
  3486.          06h    WORD    target address offset
  3487.  
  3488. Format of new executable resource data:
  3489. Offset    Size    Description
  3490.  00h    WORD    alignment shift count for resource data
  3491.  02h  N RECORDs resources
  3492.     Format of resource record:
  3493.     Offset    Size    Description
  3494.      00h    WORD    type ID
  3495.             0000h if end of resource records
  3496.             >= 8000h if integer type
  3497.             else offset from start of resource table to type string
  3498.      02h    WORD    number of resources of this type
  3499.      04h    DWORD    reserved for runtime use
  3500.      08h  N Resources (see below)
  3501. Note:    resource type and name strings are stored immediately following the
  3502.       resource table, and are not null-terminated
  3503.  
  3504. Format of new executable resource entry:
  3505. Offset    Size    Description
  3506.  00h    WORD    offset in alignment units from start of file to contents of
  3507.         the resource data
  3508.  02h    WORD    length of resource image in bytes
  3509.  04h    WORD    flags
  3510.         bit 4: moveable
  3511.         bit 5: shareable
  3512.         bit 6: preloaded
  3513.  06h    WORD    resource ID
  3514.         >= 8000h if integer resource
  3515.         else offset from start of resource table to resource string
  3516.  08h    DWORD    reserved for runtime use
  3517. Notes:    resource type and name strings are stored immediately following the
  3518.       resource table, and are not null-terminated
  3519.     strings are counted strings, with a string of length 0 indicating the
  3520.       end of the resource table
  3521.  
  3522. Format of new executable module reference table [one bundle of entries]:
  3523. Offset    Size    Description
  3524.  00h    BYTE    number of records in this bundle (00h if end of table)
  3525.  01h    BYTE    segment indicator
  3526.         00h unused
  3527.         FFh movable segment, segment number is in entry
  3528.         else segment number of fixed segment
  3529.  02h  N RECORDs
  3530.     Format of segment record
  3531.     Offset    Size    Description
  3532.      00h    BYTE    flags
  3533.             bit 0: entry is exported
  3534.             bit 1: entry uses global (shared) data
  3535.             bits 7-3: number of parameter words
  3536.     ---fixed segment---
  3537.      01h    WORD    offset
  3538.     ---moveable segment---
  3539.      01h  2 BYTEs    INT 3F instruction (CDh 3Fh)
  3540.      03h    BYTE    segment number
  3541.      05h    WORD    offset
  3542. Note:    table entries are numbered starting from 1
  3543.  
  3544. Format of new executable resident/nonresident name table entry:
  3545. Offset    Size    Description
  3546.  00h    BYTE    length of string (00h if end of table)
  3547.  01h  N BYTEs    ASCII text of string
  3548.  N+1    WORD    ordinal number (index into entry table)
  3549. Notes:    the first string in the resident name table is the module name; the
  3550.       first entry in the nonresident name table is the module description
  3551.     the strings are case-sensitive; if the executable was linked with
  3552.       /IGNORECASE, all strings are in uppercase
  3553.  
  3554. Format of Linear Executable (enhanced mode executable) header:
  3555. Offset    Size    Description
  3556.  00h  2 BYTEs    "LE" (4Ch 45h) signature (Windows)
  3557.         "LX" (4Ch 58h) signature (OS/2)
  3558.  02h    BYTE    byte order (00h = little-endian, nonzero = big-endian)
  3559.  03h    BYTE    word order (00h = little-endian, nonzero = big-endian)
  3560.  04h    DWORD    executable format level
  3561.  08h    WORD    CPU type (see also INT 15/AH=C9h)
  3562.         01h Intel 80286 or upwardly compatible
  3563.         02h Intel 80386 or upwardly compatible
  3564.         03h Intel 80486 or upwardly compatible
  3565.         04h Intel Pentium (80586) or upwardly compatible
  3566.         20h Intel i860 (N10) or compatible
  3567.         21h Intel "N11" or compatible
  3568.         40h MIPS Mark I (R2000, R3000) or compatible
  3569.         41h MIPS Mark II (R6000) or compatible
  3570.         42h MIPS Mark III (R4000) or compatible
  3571.  0Ah    WORD    target operating system
  3572.         01h OS/2
  3573.         02h Windows
  3574.         03h European DOS 4.0
  3575.         04h Windows 386
  3576.  0Ch    DWORD    module version
  3577.  10h    DWORD    module type
  3578.         bit 2: initialization (only for DLLs)
  3579.             0 = global
  3580.             1 = per-process
  3581.         bit 4: no internal fixups in executable image
  3582.         bit 5: no external fixups in executable image
  3583.         bits 8,9,10:
  3584.             0 = unknown
  3585.             1 = incompatible with PM windowing \
  3586.             2 = compatible with PM windowing    > (only for
  3587.             3 = uses PM windowing API       /    programs)
  3588.         bit 13: module not loadable (only for programs)
  3589.         bits 17,16,15: module type
  3590.             000 program
  3591.             001 library (DLL)
  3592.             011 protected memory library module
  3593.             100 physical device driver
  3594.             110 virtual device driver
  3595.         bit 30: per-process library termination
  3596.             (requires valid CS:EIP, can't be set for .EXE)
  3597.  14h    DWORD    number of memory pages
  3598.  18h    Initial CS:EIP
  3599.     DWORD    object number
  3600.     DWORD    offset
  3601.  20h    Initial SS:ESP
  3602.     DWORD    object number
  3603.     DWORD    offset
  3604.  28h    DWORD    memory page size
  3605.  2Ch    DWORD    (Windows LE) bytes on last page
  3606.         (OS/2 LX) page offset shift count
  3607.  30h    DWORD    fixup section size
  3608.  34h    DWORD    fixup section checksum
  3609.  38h    DWORD    loader section size
  3610.  3Ch    DWORD    loader section checksum
  3611.  40h    DWORD    offset of object table (see below)
  3612.  44h    DWORD    object table entries
  3613.  48h    DWORD    object page map table offset
  3614.  4CH    DWORD    object iterate data map offset
  3615.  50h    DWORD    resource table offset
  3616.  54h    DWORD    resource table entries
  3617.  58h    DWORD    resident names table offset
  3618.  5Ch    DWORD    entry table offset
  3619.  60h    DWORD    module directives table offset
  3620.  64h    DWORD    Module Directives entries
  3621.  68h    DWORD    Fixup page table offset
  3622.  6Ch    DWORD    Fixup record table offset
  3623.  70h    DWORD    imported modules name table offset
  3624.  74h    DWORD    imported modules count
  3625.  78h    DWORD    imported procedures name table offset
  3626.  7Ch    DWORD    per-page checksum table offset
  3627.  80h    DWORD    data pages offset
  3628.  84h    DWORD    preload page count
  3629.  88h    DWORD    non-resident names table offset
  3630.  8Ch    DWORD    non-resident names table length
  3631.  90h    DWORD    non-resident names checksum
  3632.  94h    DWORD    automatic data object
  3633.  98h    DWORD    debug information offset
  3634.  9Ch    DWORD    debug information length
  3635.  A0h    DWORD    preload instance pages number
  3636.  A4h    DWORD    demand instance pages number
  3637.  A8h    DWORD    extra heap allocation
  3638.  ACh 20 BYTEs    reserved
  3639.  C0h    WORD    device ID (MS-Windows VxD only)
  3640.  C2h    WORD    DDK version (MS-Windows VxD only)
  3641. Note:    used by EMM386.EXE, QEMM, and Windows 3.0 Enhanced Mode drivers
  3642.  
  3643. Format of object table entry:
  3644. Offset    Size    Description
  3645.  00h    DWORD    virtual size in bytes
  3646.  04h    DWORD    relocation base address
  3647.  08h    DWORD    object flags (see below)
  3648.  0Ch    DWORD    page map index
  3649.  10h    DWORD    page map entries
  3650.  14h  4 BYTEs    reserved??? (apparently always zeros)
  3651.  
  3652. Bitfields for object flags:
  3653.  bit 0    readable
  3654.  bit 1    writable
  3655.  bit 2    executable
  3656.  bit 3    resource
  3657.  bit 4    discardable
  3658.  bit 5    shared
  3659.  bit 6    preloaded
  3660.  bit 7    invalid
  3661.  bit 8-9 type
  3662.     00 normal
  3663.     01 zero-filled
  3664.     10 resident
  3665.     11 resident and contiguous
  3666.  bit 10 resident and long-lockable
  3667.  bit 11 reserved
  3668.  bit 12 16:16 alias required
  3669.  bit 13 "BIG" (Huge: 32-bit)
  3670.  bit 14 conforming
  3671.  bit 15 "OBJECT_I/O_PRIVILEGE_LEVEL"
  3672.  bits 16-31 reserved
  3673.  
  3674. Format of object page map table entry:
  3675. Offset    Size    Description
  3676.  00h    BYTE    ??? (usually 00h)
  3677.  01h    WORD    (big-endian) index to fixup table
  3678.         0000h if no relocation info
  3679.  03h    BYTE    type (00h hard copy in file, 03h some relocation needed)
  3680.  
  3681. Format of resident names table entry:
  3682. Offset    Size    Description
  3683.  00h    BYTE    length of name
  3684.  01h  N BYTEs    name
  3685.  N+1  3 BYTEs    ???
  3686.  
  3687. Format of LE linear executable entry table:
  3688. Offset    Size    Description
  3689.  00h    BYTE    number of entries in table
  3690.  01h 10 BYTEs per entry
  3691.         Offset    Size    Description
  3692.          00h    BYTE    bit flags
  3693.                 bit 0: non-empty bundle
  3694.                 bit 1: 32-bit entry
  3695.          01h    WORD    object number
  3696.          03h    BYTE    entry type flags
  3697.                 bit 0: exported
  3698.                 bit 1: uses single data rather than instance
  3699.                 bit 2: reserved
  3700.                 bits 3-7: number of stack parameters
  3701.          04h    DWORD    offset of entry point
  3702.          08h  2 BYTEs    ???
  3703. Note:    empty bundles (bit flags at 00h = 00h) are used to skip unused indices,
  3704.       and do not contain the remaining nine bytes
  3705.  
  3706. Format of LX linear executable entry table [array]:
  3707. Offset    Size    Description
  3708.  00h    BYTE    number of bundles following (00h = end of entry table)
  3709.  01h    BYTE    bundle type
  3710.         00h empty
  3711.         01h 16-bit entry
  3712.         02h 286 callgate entry
  3713.         03h 32-bit entry
  3714.         04h forwarder entry
  3715.         bit 7 set if additional parameter typing information is present
  3716. ---bundle type 00h---
  3717.  no additional fields
  3718. ---bundle type 01h---
  3719.  02h    WORD    object number
  3720.  04h    BYTE    entry flags
  3721.         bit 0: exported
  3722.         bits 7-3: number of stack parameters
  3723.  05h    WORD    offset of entry point in object (shifted by page size shift)
  3724. ---bundle type 02h---
  3725.  02h    WORD    object number
  3726.  04h    BYTE    entry flags
  3727.         bit 0: exported
  3728.         bits 7-3: number of stack parameters
  3729.  05h    WORD    offset of entry point in object
  3730.  07h    WORD    reserved for callgate selector (used by loader)
  3731. ---bundle type 03h---
  3732.  02h    WORD    object number
  3733.  04h    BYTE    entry flags
  3734.         bit 0: exported
  3735.         bits 7-3: number of stack parameters
  3736.  05h    DWORD    offset of entry point in object
  3737. ---bundle type 04h---
  3738.  02h    WORD    reserved
  3739.  04h    BYTE    forwarder flags
  3740.         bit 0: import by ordinal
  3741.         bits 7-1 reserved
  3742.  05h    WORD    module ordinal
  3743.         (forwarder's index into Import Module Name table)
  3744.  07h    DWORD    procedure name offset or import ordinal number
  3745. Note:    all fields after the first two bytes are repeated N times
  3746.  
  3747. Bitfields for linear executable fixup type:
  3748.  bit 7    ordinal is BYTE rather than WORD
  3749.  bit 6    16-bit rather than 8-bit object number/module ordinal
  3750.  bit 5    addition with DWORD rather than WORD
  3751.  bit 4    relocation info has size with new two bytes at end
  3752.  bit 3    reserved (0)
  3753.  bit 2    set if add to destination, clear to replace destination
  3754.  bits 1-0    type
  3755.         00 internal fixup
  3756.         01 external fixup, imported by ordinal
  3757.         10 external fixup, imported by name
  3758.         11 internal fixup via entry table
  3759.  
  3760. Format of linear executable fixup record:
  3761. Offset    Size    Description
  3762.  00h    BYTE    type
  3763.         bits 7-4: modifier (0001 single, 0011 multiple)
  3764.         bits 3-0: type
  3765.             0000 byte offset
  3766.             0010 word segment
  3767.             0011 16-bit far pointer (DWORD)
  3768.             0101 16-bit offset
  3769.             0110 32-bit far pointer (PWORD)
  3770.             0111 32-bit offset
  3771.             1000 near call or jump, WORD/DWORD based on seg attrib
  3772.  01h    BYTE    linear executable fixup type (see above)
  3773. ---if single type---
  3774.  02h    WORD    offset within page
  3775.  04h    relocation information
  3776.     ---internal fixup---
  3777.     BYTE    object number
  3778.     ---external,ordinal---
  3779.     BYTE    one-based module number in Import Module table
  3780.     BYTE/WORD ordinal number
  3781.     WORD/DWORD value to add (only present if modifier bit 4 set)
  3782.     ---external,name---
  3783.     BYTE    one-based module number in Import Module table
  3784.     WORD    offset in Import Procedure names
  3785.     WORD/DWORD value to add (only present if modifier bit 4 set)
  3786. ---if multiple type---
  3787.  02h    BYTE    number of items
  3788.  03h    var    relocation info as for "single" type (see above)
  3789.       N WORDs    offsets of items to relocate
  3790.  
  3791. Format of old Phar Lap .EXP file header:
  3792. Offset    Size    Description
  3793.  00h  2 BYTEs    "MP" (4Dh 50h) signature
  3794.  02h    WORD    remainder of image size / page size (page size = 512h)
  3795.  04h    WORD    size of image in pages
  3796.  06h    WORD    number of relocation items
  3797.  08h    WORD    header size in paragraphs
  3798.  0Ah    WORD    minimum number of extra 4K pages to be allocated at the end
  3799.         of program, when it is loaded
  3800.  0Ch    WORD    maximum number of extra 4K pages to be allocated at the end
  3801.         of program, when it is loaded
  3802.  0Eh    DWORD    initial ESP
  3803.  12h    WORD    word checksum of file
  3804.  14h    DWORD    initial EIP
  3805.  18h    WORD    offset of first relocation item
  3806.  1Ah    WORD    overlay number
  3807.  1Ch    WORD    ??? (wants to be 1)
  3808.  
  3809. Format of new Phar Lap .EXP file header:
  3810. Offset    Size    Description
  3811.  00h  2 BYTEs    signature ("P2" for 286 .EXP executable, "P3" for 386 .EXP)
  3812.  02h    WORD    level (01h flat-model file, 02h multisegmented file)
  3813.  04h    WORD    header size
  3814.  06h    DWORD    file size in bytes
  3815.  0Ah    WORD    checksum
  3816.  0Ch    DWORD    offset of run-time parameters within file
  3817.  10h    DWORD    size of run-time parameters in bytes
  3818.  14h    DWORD    offset of relocation table within file
  3819.  18h    DWORD    size of relocation table in bytes
  3820.  1Ch    DWORD    offset of segment information table within file
  3821.  20h    DWORD    size of segment information table in bytes
  3822.  24h    WORD    size of segment information table entry in bytes
  3823.  26h    DWORD    offset of load image within file
  3824.  2Ah    DWORD    size of load image on disk
  3825.  2Eh    DWORD    offset of symbol table within file
  3826.  32h    DWORD    size of symbol table in bytes
  3827.  36h    DWORD    offset of GDT within load image
  3828.  3Ah    DWORD    size of GDT in bytes
  3829.  3Eh    DWORD    offset of LDT within load image
  3830.  42h    DWORD    size of LDT in bytes
  3831.  46h    DWORD    offset of IDT within load image
  3832.  4Ah    DWORD    size of IDT in bytes
  3833.  4Eh    DWORD    offset of TSS within load image
  3834.  52h    DWORD    size of TSS in bytes
  3835.  56h    DWORD    minimum number of extra bytes to be allocated at end of program
  3836.         (level 1 executables only)
  3837.  5Ah    DWORD    maximum number of extra bytes to be allocated at end of program
  3838.         (level 1 executables only)
  3839.  5Eh    DWORD    base load offset (level 1 executables only)
  3840.  62h    DWORD    initial ESP
  3841.  66h    WORD    initial SS
  3842.  68h    DWORD    initial EIP
  3843.  6Ch    WORD    initial CS
  3844.  6Eh    WORD    initial LDT
  3845.  70h    WORD    initial TSS
  3846.  72h    WORD    flags
  3847.         bit 0: load image is packed
  3848.         bit 1: 32-bit checksum is present
  3849.         bits 4-2: type of relocation table
  3850.  74h    DWORD    memory requirements for load image
  3851.  78h    DWORD    32-bit checksum (optional)
  3852.  7Ch    DWORD    size of stack segment in bytes
  3853.  80h 256 BYTEs    reserved (0)
  3854.  
  3855. Format of Phar Lap segment information table entry:
  3856. Offset    Size    Description
  3857.  00h    WORD    selector number
  3858.  02h    WORD    flags
  3859.  04h    DWORD    base offset of selector
  3860.  08h    DWORD    minimum number of extra bytes to be allocated to the segment
  3861.  
  3862. Format of 386|DOS-Extender run-time parameters:
  3863. Offset    Size    Description
  3864.  00h  2 BYTEs    signature "DX" (44h 58h)
  3865.  02h    WORD    minimum number of real-mode params to leave free at run time
  3866.  04h    WORD    maximum number of real-mode params to leave free at run time
  3867.  06h    WORD    minimum interrupt buffer size in KB
  3868.  08h    WORD    maximum interrupt buffer size in KB
  3869.  0Ah    WORD    number of interrupt stacks
  3870.  0Ch    WORD    size in KB of each interrupt stack
  3871.  0Eh    DWORD    offset of byte past end of real-mode code and data
  3872.  12h    WORD    size in KB of call buffers
  3873.  14h    WORD    flags
  3874.         bit 0: file is virtual memory manager
  3875.         bit 1: file is a debugger
  3876.  16h    WORD    unprivileged flag (if nonzero, executes at ring 1, 2, or 3)
  3877.  18h 104 BYTEs    reserved (0)
  3878.  
  3879. Format of Phar Lap repeat block header:
  3880. Offset    Size    Description
  3881.  00h    WORD    byte count
  3882.  02h    BYTE    repeat string length
  3883.  
  3884. Format of Borland debugging information header (following load image):
  3885. Offset    Size    Description
  3886.  00h    WORD    signature 52FBh
  3887.  02h    WORD    version ID
  3888.  04h    DWORD    size of name pool in bytes
  3889.  08h    WORD    number of names in namem pool
  3890.  0Ah    WORD    number of type entries
  3891.  0Ch    WORD    number of structure members
  3892.  0Eh    WORD    number of symbols
  3893.  10h    WORD    number of global symbols
  3894.  12h    WORD    number of modules
  3895.  14h    WORD    number of locals (optional)
  3896.  16h    WORD    number of scopes in table
  3897.  18h    WORD    number of line-number entries
  3898.  1Ah    WORD    number of include files
  3899.  1Ch    WORD    number of segment records
  3900.  1Eh    WORD    number of segment/file correlations
  3901.  20h    DWORD    size of load image after removing uninitialized data and debug
  3902.         info
  3903.  24h    DWORD    debugger hook; pointer into debugged program whose meaning
  3904.         depends on program flags
  3905.  28h    BYTE    program flags
  3906.         bit 0: case-sensitive link
  3907.         bit 1: pascal overlay program
  3908.  29h    WORD    no longer used
  3909.  2Bh    WORD    size of data pool in bytes
  3910.  2Dh    BYTE    padding
  3911.  2Eh    WORD    size of following header extension (currently 00h, 10h, or 20h)
  3912.  30h    WORD    number of classes
  3913.  32h    WORD    number of parents
  3914.  34h    WORD    number of global classes (currently unused)
  3915.  36h    WORD    number of overloads (currently unused)
  3916.  38h    WORD    number of scope classes
  3917.  3Ah    WORD    number of module classes
  3918.  3Ch    WORD    number of coverage offsets
  3919.  3Eh    DWORD    offset relative to symbol base of name pool
  3920.  42h    WORD    number of browser information records
  3921.  44h    WORD    number of optimized symbol records
  3922.  46h    WORD    debugging flags
  3923.  48h  8 BYTEs    padding
  3924. Note:    additional information on the Borland debugging info may be found in
  3925.       Borland's Open Architecture Handbook
  3926. --------U-214B-------------------------------
  3927. INT 21 - ELRES v1.0 only - INSTALLATION CHECK
  3928.     AH = 4Bh
  3929.     DS:DX = 0000h:0000h
  3930. Return: ES:BX -> ELRES history structure (see AH=2Bh/CX=454Ch)
  3931.     DX = DABEh (signature, DAve BEnnett)
  3932. Program: ELRES is an MS-DOS return code (errorlevel) recorder by David H.
  3933.       Bennett
  3934. SeeAlso: AH=2Bh/CX=454Ch
  3935. --------v-214B04-----------------------------
  3936. INT 21 - VIRUS - "MG", "699"/"Thirteen Minutes" - INSTALLATION CHECK
  3937.     AX = 4B04h
  3938. Return: CF clear if "MG" resident
  3939.     AX = 044Bh if "699"/"Thirteen Minutes" resident
  3940. SeeAlso: AX=4243h,AX=4B21h
  3941. --------D-214B05-----------------------------
  3942. INT 21 - DOS 5+ - SET EXECUTION STATE
  3943.     AX = 4B05h
  3944.     DS:DX -> execution state structure (see below)
  3945. Return: CF clear if successful
  3946.         AX = 0000h
  3947.     CF set on error
  3948.         AX = error code (see AH=59h)
  3949. Note:    used by programs which intercept AX=4B00h to prepare new programs for
  3950.       execution (including setting the DOS version number).     No DOS, BIOS
  3951.       or other software interrupt may be called after return from this call
  3952.       before commencement of the child process.  If DOS is running in the
  3953.       HMA, A20 is turned off on return from this call.
  3954. SeeAlso: AH=4Bh
  3955.  
  3956. Format of execution state structure:
  3957. Offset    Size    Description
  3958.  00h    WORD    reserved (00h)
  3959.  02h    WORD    type flags
  3960.         bit 0: program is an .EXE
  3961.         bit 1: program is an overlay
  3962.  04h    DWORD    pointer to ASCIZ name of program file
  3963.  08h    WORD    PSP segment of new program
  3964.  0Ah    DWORD    starting CS:IP of new program
  3965.  0Eh    DWORD    program size including PSP
  3966. --------v-214B20-----------------------------
  3967. INT 21 - VIRUS - "Holocaust"/"Telefonica" - ???
  3968.     AX = 4B20h
  3969. SeeAlso: AX=4B04h,AX=4B21h
  3970. --------v-214B21-----------------------------
  3971. INT 21 C - VIRUS - "Holocaust"/"Telefonica" - ???
  3972.     AX = 4B21h
  3973. Note:    called at completion of virus installation
  3974. SeeAlso: AX=4B04h,AX=4B20h,AX=4B25h
  3975. --------v-214B25-----------------------------
  3976. INT 21 - VIRUS - "1063"/"Mono" - INSTALLATION CHECK
  3977.     AX = 4B25h
  3978. Return: DI = 1234h if resident
  3979. SeeAlso: AX=4B21h,AX=4B40h
  3980. --------v-214B40-----------------------------
  3981. INT 21 - VIRUS - "Plastique"/"AntiCad" - INSTALLATION CHECK
  3982.     AX = 4B40h
  3983. Return: AX = 5678h if resident
  3984. SeeAlso: AX=4B25h,AX=4B41h,AX=4B4Ah
  3985. --------v-214B41-----------------------------
  3986. INT 21 - VIRUS - "Plastique"/"AntiCad" - ???
  3987.     AX = 4B41h
  3988.     ???
  3989. Return: ???
  3990. SeeAlso: AX=4B40h
  3991. --------v-214B4A-----------------------------
  3992. INT 21 - VIRUS - "Jabberwocky" - INSTALLATION CHECK
  3993.     AX = 4B4Ah
  3994. Return: AL = 57h if resident
  3995. SeeAlso: AX=4B40h,AX=4B4Bh
  3996. --------v-214B4B-----------------------------
  3997. INT 21 - VIRUS - "Horse-2" - INSTALLATION CHECK
  3998.     AX = 4B4Bh
  3999. Return: CF clear if resident
  4000. SeeAlso: AX=4B4Ah,AX=4B4Dh
  4001. --------v-214B4D-----------------------------
  4002. INT 21 - VIRUS - "Murphy-2", "Patricia"/"Smack" - INSTALLATION CHECK
  4003.     AX = 4B4Dh
  4004. Return: CF clear if resident
  4005. SeeAlso: AX=4B4Ah,AX=4B50h
  4006. --------v-214B50-----------------------------
  4007. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - INSTALLATION CHECK
  4008.     AX = 4B50h
  4009. Return: AX = 1234h if resident
  4010. SeeAlso: AX=4B4Dh,AX=4B53h,AX=4B60h
  4011. --------v-214B53-----------------------------
  4012. INT 21 - VIRUS - "Horse" - INSTALLATION CHECK
  4013.     AX = 4B53h
  4014. Return: CF clear if resident
  4015. SeeAlso: AX=4B50h,AX=4B55h
  4016. --------v-214B55-----------------------------
  4017. INT 21 - VIRUS - "Sparse" - INSTALLATION CHECK
  4018.     AX = 4B55h
  4019. Return: AX = 1231h if resident
  4020. SeeAlso: AX=4B53h,AX=4B59h
  4021. --------v-214B59-----------------------------
  4022. INT 21 - VIRUS - "Murphy-1", "Murphy-4" - INSTALLATION CHECK
  4023.     AX = 4B59h
  4024. Return: CF clear if resident
  4025. SeeAlso: AX=4B50h,AX=4B5Eh
  4026. --------v-214B5E-----------------------------
  4027. INT 21 - VIRUS - "Brothers" - INSTALLATION CHECK
  4028.     AX = 4B5Eh
  4029. Return: CF clear if resident
  4030. SeeAlso: AX=4B59h,AX=4B87h
  4031. --------v-214B60-----------------------------
  4032. INT 21 - VIRUS - "Plastique-2576"/"AntiCad-2576" - ???
  4033.     AX = 4B60h
  4034.     ???
  4035. Return: ???
  4036. SeeAlso: AX=4B50h
  4037. --------v-214B87-----------------------------
  4038. INT 21 - VIRUS - "Shirley" - INSTALLATION CHECK
  4039.     AX = 4B87h
  4040. Return: AX = 6663h if resident
  4041. SeeAlso: AX=4B5Eh,AX=4B95h
  4042. --------v-214B95-----------------------------
  4043. INT 21 - VIRUS - "Zherkov-1882" - INSTALLATION CHECK
  4044.     AX = 4B95h
  4045. Return: AX = 1973h if resident
  4046. SeeAlso: AX=4B87h,AX=4BA7h
  4047. --------v-214BA7-----------------------------
  4048. INT 21 - VIRUS - "1876"/"Dash-em" - INSTALLATION CHECK
  4049.     AX = 4BA7h
  4050. Return: AX = B459h if resident
  4051. SeeAlso: AX=4B95h,AX=4BAAh
  4052. --------v-214BAA-----------------------------
  4053. INT 21 - VIRUS - "Nomenklatura" - INSTALLATION CHECK
  4054.     AX = 4BAAh
  4055. Return: CF clear if resident
  4056. SeeAlso: AX=4BA7h,AX=4BAFh
  4057. --------v-214BAF-----------------------------
  4058. INT 21 - VIRUS - "948"/"Screenplus1", "Magnitogorsk" - INSTALLATION CHECK
  4059.     AX = 4BAFh
  4060. Return: AL = AFh if "Magnitogorsk" resident
  4061.     AL = FAh if "948"/"Screenplus1" resident
  4062. SeeAlso: AX=4BAAh,AX=4BDDh
  4063. --------v-214BDD-----------------------------
  4064. INT 21 - VIRUS - "Lozinsky"/"Zherkov" - INSTALLATION CHECK
  4065.     AX = 4BDDh
  4066. Return: AX = 1234h
  4067. SeeAlso: AX=4BAFh,AX=4BFEh
  4068. --------v-214BEE-----------------------------
  4069. INT 21 - F-DRIVER.SYS v1.14+ - GRAB INT 21
  4070.     AX = 4BEEh
  4071. Return: AX = 1234h if grab successful
  4072.        = 2345h if failed (INT 21 grabbed previously)
  4073. Notes:    F-DRIVER.SYS is part of the F-PROT virus/trojan protection package by
  4074.       Fridrik Skulason
  4075.     when called the first time, this function moves the INT 21 monitoring
  4076.       code from its original location in the INT 21 chain to be the first
  4077.       thing called by INT 21.  This is the mechanism used by F-NET.
  4078. SeeAlso: INT 2F/AX=4653h
  4079. --------k-214BF0-----------------------------
  4080. INT 21 - DIET v1.10+ (Overlay Mode) - INSTALLATION CHECK
  4081.     AX = 4BF0h
  4082. Return: CF clear if installed
  4083.         AX = 899Dh
  4084. Program: DIET is an executable-compression program by Teddy Matsumoto
  4085. SeeAlso: AX=37D0h,AX=4BF1h
  4086. --------k-214BF1-----------------------------
  4087. INT 21 - DIET v1.10+ (Overlay Mode) - EXPAND PROGRAM???
  4088.     AX = 4BF1h
  4089. Return: ???
  4090. SeeAlso: AX=37D0h,AX=4BF0h
  4091. --------v-214BFE-----------------------------
  4092. INT 21 - VIRUS - "Hitchcock", "Dark Avenger-1028", "1193" - INSTALLATION CHECK
  4093.     AX = 4BFEh
  4094. Return: AX = 1234h if "Hitchcock" resident
  4095.     AX = ABCDh if "1193"/"Copyright" resident
  4096.     DI = 55BBh if "Dark Avenger-1028" resident
  4097. SeeAlso: AX=4BDDh,AX=4BFFh"Justice"
  4098. --------v-214BFF-----------------------------
  4099. INT 21 - VIRUS - "USSR-707", "Justice", "Europe 92" - INSTALLATION CHECK
  4100.     AX = 4BFFh
  4101. Return: BL = FFh if "USSR-707" resident
  4102.     DI = 55AAh if "Justice" resident
  4103.     CF clear if "Europe 92" resident
  4104. SeeAlso: AX=4BFEh,AX=4BFFh"Cascade",AX=5252h
  4105. --------v-214BFFSI0000-----------------------
  4106. INT 21 - VIRUS - "Cascade" - INSTALLATION CHECK
  4107.     AX = 4BFFh
  4108.     SI = 0000h
  4109.     DI = 0000h
  4110. Return: DI = 55AAh if installed
  4111. SeeAlso: AX=4BFFh"Justice",AX=5252h
  4112. --------D-214C-------------------------------
  4113. INT 21 - DOS 2+ - "EXIT" - TERMINATE WITH RETURN CODE
  4114.     AH = 4Ch
  4115.     AL = return code
  4116. Return: never returns
  4117. Notes:    unless the process is its own parent (see AH=26h, offset 16h in PSP),
  4118.       all open files are closed and all memory belonging to the process
  4119.       is freed
  4120.     all network file locks should be removed before calling this function
  4121. SeeAlso: AH=00h,AH=26h,AH=4Bh,AH=4Dh,INT 15/AH=12h/BH=02h,INT 20,INT 22
  4122. SeeAlso: INT 60/DI=0601h
  4123. ----------214C57-----------------------------
  4124. INT 21 - Headroom - ???
  4125.     AX = 4C57h
  4126.     DS:DX -> target address
  4127. Note:    jumps to target address instead of terminating program
  4128. SeeAlso: AX=5758h
  4129. --------D-214D-------------------------------
  4130. INT 21 - DOS 2+ - GET RETURN CODE (ERRORLEVEL)
  4131.     AH = 4Dh
  4132. Return: AH = termination type
  4133.         00h normal (INT 20,INT 21/AH=00h, or INT 21/AH=4Ch)
  4134.         01h control-C abort
  4135.         02h critical error abort
  4136.         03h terminate and stay resident (INT 21/AH=31h or INT 27)
  4137.     AL = return code
  4138. Notes:    the word in which DOS stores the return code is cleared after being
  4139.       read by this function, so the return code can only be retrieved once
  4140.     COMMAND.COM stores the return code of the last external command it
  4141.       executed as ERRORLEVEL
  4142.     this call should not be used if the child was started with AX=4B04h;
  4143.       use AH=8Ah instead
  4144.     the following sequence will close a Virtual DOS Machine under OS/2 2.0:
  4145.       MOV    AH,4Dh
  4146.       INT    21h
  4147.       HLT
  4148.       DB    02h,0FDh
  4149.       This sequence is the only way to close a specific VDM which was
  4150.       booted from floppy or a disk image.
  4151. SeeAlso: AH=4Bh,AH=4Ch,AH=8Ah
  4152. --------D-214E-------------------------------
  4153. INT 21 - DOS 2+ - "FINDFIRST" - FIND FIRST MATCHING FILE
  4154.     AH = 4Eh
  4155.     AL = special flag for use by APPEND (see note below)
  4156.     CX = file attribute mask (see AX=4301h) (bits 0 and 5 ignored)
  4157.         0088h (Novell DOS 7) find first deleted file
  4158.     DS:DX -> ASCIZ file specification (may include path and wildcards)
  4159. Return: CF clear if successful
  4160.         [DTA] = FindFirst data block (see below)
  4161.     CF set on error
  4162.         AX = error code (02h,03h,12h) (see AH=59h)
  4163. Notes:    for search attributes other than 08h, all files with at MOST the
  4164.       specified combination of hidden, system, and directory attributes
  4165.       will be returned.  Under DOS 2.x, searching for attribute 08h
  4166.       (volume label) will also return normal files, while under DOS 3+
  4167.       only the volume label (if any) will be returned.
  4168.     this call also returns successfully if given the name of a character
  4169.       device without wildcards.  DOS 2.x returns attribute 00h, size 0,
  4170.       and the current date and time.  DOS 3+ returns attribute 40h and the
  4171.       current date and time.
  4172.     immediately after an INT 2F/AX=B711h (APPEND return found name), the
  4173.       name at DS:DX will be overwritten; if AL=00h on entry, the actual
  4174.       found pathname will be stored, otherwise, the actual found path
  4175.       will be prepended to the original filespec without a path.
  4176.     under LANtastic, this call may be used to obtain a list of a server's
  4177.       shared resources by searching for "\\SERVER\*.*"; a list of printer
  4178.       resources may be obtained by searching for "\\SERVER\@*.*"
  4179.     under the FlashTek X-32 DOS extender, the filespec pointer is in DS:EDX
  4180. BUGS:    under DOS 3.x and 4.x, the second and subsequent calls to this function
  4181.       with a character device name (no wildcards) and search attributes
  4182.       which include the volume-label bit (08h) will fail unless there is
  4183.       an intervening DOS call which implicitly or explicity performs a
  4184.       directory search without the volume-label bit.  Such implicit
  4185.       searches are performed by CREATE (AH=3Ch), OPEN (AH=3Dh), UNLINK
  4186.       (AH=41h), and RENAME (AH=56h)
  4187.     DR-DOS 3.41 and 5.0 return the Directory attribute for the volume label
  4188. SeeAlso: AH=11h,AH=4Fh,AX=4301h,INT 2F/AX=111Bh,INT 2F/AX=B711h
  4189.  
  4190. Format of FindFirst data block:
  4191. Offset    Size    Description
  4192. ---PC-DOS 3.10, PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
  4193.  00h    BYTE    drive letter (bits 0-6), remote if bit 7 set
  4194.  01h 11 BYTEs    search template
  4195.  0Ch    BYTE    search attributes
  4196. ---DOS 2.x (and some DOS 3.x???)---
  4197.  00h    BYTE    search attributes
  4198.  01h    BYTE    drive letter
  4199.  02h 11 BYTEs    search template
  4200. ---WILDUNIX.COM---
  4201.  00h 12 BYTEs    15-character wildcard search pattern and drive letter (packed)
  4202.  0Ch    BYTE    search attributes
  4203. ---DOS 2.x and most 3.x---
  4204.  0Dh    WORD    entry count within directory
  4205.  0Fh    DWORD    pointer to DTA???
  4206.  13h    WORD    cluster number of start of parent directory
  4207. ---PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
  4208.  0Dh    WORD    entry count within directory
  4209.  0Fh    WORD    cluster number of start of parent directory
  4210.  11h  4 BYTEs    reserved
  4211. ---all versions, documented fields---
  4212.  15h    BYTE    attribute of file found
  4213.  16h    WORD    file time
  4214.             bits 11-15: hour
  4215.             bits 5-10:    minute
  4216.             bits 0-4:    seconds/2
  4217.  18h    WORD    file date
  4218.             bits 9-15:    year-1980
  4219.             bits 5-8:    month
  4220.             bits 0-4:    day
  4221.  1Ah    DWORD    file size
  4222.  1Eh 13 BYTEs    ASCIZ filename+extension
  4223. --------f-214E-------------------------------
  4224. INT 21 - WILDUNIX.COM internal - INSTALLATION CHECK
  4225.     AH = 4Eh
  4226.     DS:DX = 0000h:0000h
  4227. Return: AH = 99h if installed
  4228. Program: WILDUNIX.COM is a resident Unix-style wildcard expander by Steve
  4229.       Hosgood and Terry Barnaby
  4230. --------D-214F-------------------------------
  4231. INT 21 - DOS 2+ - "FINDNEXT" - FIND NEXT MATCHING FILE
  4232.     AH = 4Fh
  4233.     [DTA] = data block from previous FindFirst or FindNext call
  4234. Return: CF clear if successful
  4235.     CF set on error
  4236.         AX = error code (12h) (see AH=59h)
  4237. Note:    under Novell DOS 7, if the FindFirst call (AH=4Eh) had CX=0088h, then
  4238.       the next matching deleted file will be returned
  4239. BUG:    DR-DOS 3.41 and 5.0 return the Directory attribute for the volume label
  4240. SeeAlso: AH=12h,AH=4Eh
  4241. --------D-2150-------------------------------
  4242. INT 21 - DOS 2+ internal - SET CURRENT PROCESS ID (SET PSP ADDRESS)
  4243.     AH = 50h
  4244.     BX = segment of PSP for new process
  4245. Notes:    DOS uses the current PSP address to determine which processes own files
  4246.       and memory; it corresponds to process identifiers used by other OSs
  4247.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  4248.       handler without setting the Critical Error flag
  4249.     under MS-DOS 3+ and DR-DOS 3.41+, this function does not use any of
  4250.       the DOS-internal stacks and may thus be called at any time, even
  4251.       during another INT 21h call
  4252.     some Microsoft applications such as Quick C 2.51 use segments of 0000h
  4253.       and FFFFh and direct access to the SDA (see AX=5D06h) to test whether
  4254.       they are running under MS-DOS rather than a compatible OS; although
  4255.       one should only call this function with valid PSP addresses, any
  4256.       program hooking it should be prepared to handle invalid addresses
  4257.     supported by OS/2 compatibility box
  4258.     this call was undocumented prior to the release of DOS 5.0
  4259. SeeAlso: AH=26h,AH=51h,AH=62h
  4260. --------D-2151-------------------------------
  4261. INT 21 - DOS 2+ internal - GET CURRENT PROCESS ID (GET PSP ADDRESS)
  4262.     AH = 51h
  4263. Return: BX = segment of PSP for current process
  4264. Notes:    DOS uses the current PSP address to determine which processes own files
  4265.       and memory; it corresponds to process identifiers used by other OSs
  4266.     under DOS 2.x, this function cannot be invoked inside an INT 28h
  4267.       handler without setting the Critical Error flag
  4268.     under DOS 3+, this function does not use any of the DOS-internal stacks
  4269.       and may thus be called at any time, even during another INT 21h call
  4270.     supported by OS/2 compatibility box
  4271.     identical to the documented AH=62h
  4272.     this call was undocumented prior to the release of DOS 5.0
  4273. SeeAlso: AH=26h,AH=50h,AH=62h
  4274. --------D-2152-------------------------------
  4275. INT 21 U - DOS 2+ internal - "SYSVARS" - GET LIST OF LISTS
  4276.     AH = 52h
  4277. Return: ES:BX -> DOS list of lists
  4278. Notes:    partially supported by OS/2 v1.1 compatibility box (however, most
  4279.       pointers are FFFFh:FFFFh, LASTDRIVE is FFh, and the NUL header "next"
  4280.       pointer is FFFFh:FFFFh).
  4281.     on return, ES points at the DOS data segment (see also INT 2F/AX=1203h)
  4282. SeeAlso: INT 2F/AX=1203h
  4283.  
  4284. Format of List of Lists:
  4285. Offset    Size    Description
  4286.  -24    WORD    (DOS 3.1+) contents of CX from INT 21/AX=5E01h
  4287.  -22    WORD    (DOS ???+) LRU counter for FCB caching
  4288.  -20    WORD    (DOS ???+) LRU counter for FCB opens
  4289.  -18    DWORD    (DOS ???+) address of OEM function handler (see INT 21/AH=F8h)
  4290.             FFFFh:FFFFh if not installed or not available
  4291.  -14    WORD    (DOS ???+) offset in DOS CS of code to return from INT 21 call
  4292.  -12    WORD    (DOS 3.1+) sharing retry count (see AX=440Bh)
  4293.  -10    WORD    (DOS 3.1+) sharing retry delay (see AX=440Bh)
  4294.  -8    DWORD    (DOS 3+) pointer to current disk buffer
  4295.  -4    WORD    (DOS 3+) pointer in DOS code segment of unread CON input
  4296.         when CON is read via a handle, DOS reads an entire line,
  4297.           and returns the requested portion, buffering the rest
  4298.           for the next read.  0000h indicates no unread input
  4299.  -2    WORD    segment of first memory control block
  4300.  00h    DWORD    pointer to first Drive Parameter Block (see AH=32h)
  4301.  04h    DWORD    pointer to first System File Table (see below)
  4302.  08h    DWORD    pointer to active CLOCK$ device's header (most recently loaded
  4303.         driver with CLOCK bit set)
  4304.  0Ch    DWORD    pointer to active CON device's header (most recently loaded
  4305.         driver with STDIN bit set)
  4306. ---DOS 2.x---
  4307.  10h    BYTE    number of logical drives in system
  4308.  11h    WORD    maximum bytes/block of any block device
  4309.  13h    DWORD    pointer to first disk buffer (see below)
  4310.  17h 18 BYTEs    actual NUL device driver header (not a pointer!)
  4311.         NUL is always the first device on DOS's linked list of device
  4312.         drivers. (see below)
  4313. ---DOS 3.0---
  4314.  10h    BYTE    number of block devices
  4315.  11h    WORD    maximum bytes/block of any block device
  4316.  13h    DWORD    pointer to first disk buffer (see below)
  4317.  17h    DWORD    pointer to array of current directory structures (see below)
  4318.  1Bh    BYTE    value of LASTDRIVE command in CONFIG.SYS (default 5)
  4319.  1Ch    DWORD    pointer to STRING= workspace area
  4320.  20h    WORD    size of STRING area (the x in STRING=x from CONFIG.SYS)
  4321.  22h    DWORD    pointer to FCB table
  4322.  26h    WORD    the y in FCBS=x,y from CONFIG.SYS
  4323.  28h 18 BYTEs    actual NUL device driver header (not a pointer!)
  4324.         NUL is always the first device on DOS's linked list of device
  4325.         drivers. (see below)
  4326. ---DOS 3.1-3.3---
  4327.  10h    WORD    maximum bytes per sector of any block device
  4328.  12h    DWORD    pointer to first disk buffer in buffer chain (see below)
  4329.  16h    DWORD    pointer to array of current directory structures (see below)
  4330.  1Ah    DWORD    pointer to system FCB tables (see below)
  4331.  1Eh    WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
  4332.  20h    BYTE    number of block devices installed
  4333.  21h    BYTE    number of available drive letters (largest of 5, installed
  4334.         block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
  4335.         current directory structure array.
  4336.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  4337.         NUL is always the first device on DOS's linked list of device
  4338.         drivers. (see below)
  4339.  34h    BYTE    number of JOIN'ed drives
  4340. ---DOS 4.x---
  4341.  10h    WORD    maximum bytes per sector of any block device
  4342.  12h    DWORD    pointer to disk buffer info record (see below)
  4343.  16h    DWORD    pointer to array of current directory structures (see below)
  4344.  1Ah    DWORD    pointer to system FCB tables (see below)
  4345.  1Eh    WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
  4346.         (always 00h for DOS 5.0)
  4347.  20h    BYTE    number of block devices installed
  4348.  21h    BYTE    number of available drive letters (largest of 5, installed
  4349.         block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
  4350.         current directory structure array.
  4351.  22h 18 BYTEs    actual NUL device driver header (not a pointer!)
  4352.         NUL is always the first device on DOS's linked list of device
  4353.         drivers. (see below)
  4354.  34h    BYTE    number of JOIN'ed drives
  4355.  35h    WORD    pointer within IBMDOS code segment to list of special program
  4356.         names (see below)
  4357.         (always 0000h for DOS 5.0)
  4358.  37h    DWORD    pointer to FAR routine for resident IFS utility functions
  4359.         (see below)
  4360.         may be called by any IFS driver which does not wish to
  4361.         service functions 20h or 24h-28h itself
  4362.  3Bh    DWORD    pointer to chain of IFS (installable file system) drivers
  4363.  3Fh    WORD    the x in BUFFERS x,y (rounded up to multiple of 30 if in EMS)
  4364.  41h    WORD    number of lookahead buffers (the y in BUFFERS x,y)
  4365.  43h    BYTE    boot drive (1=A:)
  4366.  44h    BYTE    flag: 01h to use DWORD moves (80386+), 00h otherwise
  4367.  45h    WORD    extended memory size in KB
  4368. ---DOS 5.0-6.0---
  4369.  10h 39 BYTEs    as for DOS 4.x (see above)
  4370.  37h    DWORD    pointer to SETVER program list or 0000h:0000h
  4371.  3Bh    WORD    (DOS=HIGH) offset in DOS CS of function to fix A20 control
  4372.         when executing special .COM format
  4373.  3Dh    WORD    PSP of most-recently EXECed program if DOS in HMA, 0000h if low
  4374.  3Fh  8 BYTEs    as for DOS 4.x (see above)
  4375.  
  4376. Format of memory control block (see also below):
  4377. Offset    Size    Description
  4378.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  4379.  01h    WORD    PSP segment of owner or
  4380.         0000h if free
  4381.         0006h if DR-DOS XMS UMB
  4382.         0007h if DR-DOS excluded upper memory ("hole")
  4383.         0008h if belongs to DOS
  4384.         FFFAh if 386MAX UMB control block (see AX=4402h"386MAX")
  4385.         FFFDh if 386MAX locked-out memory
  4386.         FFFEh if 386MAX UMB (immediately follows its control block)
  4387.         FFFFh if 386MAX 6.01 device driver
  4388.  03h    WORD    size of memory block in paragraphs
  4389.  05h  3 BYTEs    unused by MS-DOS
  4390.         (386MAX) if locked-out block, region start/prev region end
  4391. ---DOS 2.x,3.x---
  4392.  08h  8 BYTEs    unused
  4393. ---DOS 4+ ---
  4394.  08h  8 BYTEs    ASCII program name if PSP memory block or DR-DOS UMB,
  4395.           else garbage
  4396.         null-terminated if less than 8 characters
  4397. Notes:    the next MCB is at segment (current + size + 1)
  4398.     under DOS 3.1+, the first memory block is the DOS data segment,
  4399.       containing installable drivers, buffers, etc.     Under DOS 4+ it is
  4400.       divided into subsegments, each with its own memory control block
  4401.       (see below), the first of which is at offset 0000h.
  4402.     for DOS 5+, blocks owned by DOS may have either "SC" or "SD" in bytes
  4403.       08h and 09h.    "SC" is system code or locked-out inter-UMB memory,
  4404.       "SD" is system data, device drivers, etc.
  4405.     Some versions of DR-DOS use only seven characters of the program name,
  4406.       placing a NUL in the eighth byte.
  4407.  
  4408. Format of MS-DOS 5+ UMB control block:
  4409. Offset    Size    Description
  4410.  00h    BYTE    type: 5Ah if last block in chain, 4Dh otherwise
  4411.  01h    WORD    first available paragraph in UMB if control block at start
  4412.         of UMB, 000Ah if control block at end of UMB
  4413.  03h    WORD    length in paragraphs of following UMB or locked-out region
  4414.  05h  3 BYTEs    unused
  4415.  08h  8 BYTEs    block type name: "UMB" if start block, "SM" if end block in UMB
  4416.  
  4417. Format of STARLITE (General Software's Embedded DOS) memory control block:
  4418. Offset    Size    Description
  4419.  00h    BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
  4420.  01h    WORD    PSP segment of owner, 0000h if free, 0008h if belongs to DOS
  4421.  03h    WORD    size of memory block in paragraphs
  4422.  05h    BYTE    unused
  4423.  06h    WORD    segment address of next memory control block (0000h if last)
  4424.  08h    WORD    segment address of previous memory control block or 0000h
  4425.  0Ah  6 BYTEs    reserved
  4426.  
  4427. Format of DOS 4+ data segment subsegment control blocks:
  4428. Offset    Size    Description
  4429.  00h    BYTE    subsegment type (blocks typically appear in this order)
  4430.         "D"  device driver
  4431.         "E"  device driver appendage
  4432.         "I"  IFS (Installable File System) driver
  4433.         "F"  FILES=  control block storage area (for FILES>5)
  4434.         "X"  FCBS=   control block storage area, if present
  4435.         "C"  BUFFERS EMS workspace area (if BUFFERS /X option used)
  4436.         "B"  BUFFERS=  storage area
  4437.         "L"  LASTDRIVE=     current directory structure array storage area
  4438.         "S"  STACKS=  code and data area, if present (see below)
  4439.         "T"  INSTALL= transient code
  4440.  01h    WORD    paragraph of subsegment start (usually the next paragraph)
  4441.  03h    WORD    size of subsegment in paragraphs
  4442.  05h  3 BYTEs    unused
  4443.  08h  8 BYTEs    for types "D" and "I", base name of file from which the driver
  4444.           was loaded (unused for other types)
  4445.  
  4446. Format of data at start of STACKS code segment (if present):
  4447. Offset    Size    Description
  4448.  00h    WORD    ???
  4449.  02h    WORD    number of stacks (the x in STACKS=x,y)
  4450.  04h    WORD    size of stack control block array (should be 8*x)
  4451.  06h    WORD    size of each stack (the y in STACKS=x,y)
  4452.  08h    DWORD    pointer to STACKS data segment
  4453.  0Ch    WORD    offset in STACKS data segment of stack control block array
  4454.  0Eh    WORD    offset in STACKS data segment of last element of that array
  4455.  10h    WORD    offset in STACKS data segment of the entry in that array for
  4456.         the next stack to be allocated (initially same as value in 0Eh
  4457.         and works its way down in steps of 8 to the value in 0Ch as
  4458.         hardware interrupts pre-empt each other)
  4459. Note:    the STACKS code segment data may, if present, be located as follows:
  4460.     DOS 3.2:    The code segment data is at a paragraph boundary fairly early
  4461.         in the IBMBIO segment (seen at 0070:0190h)
  4462.     DOS 3.3:    The code segment is at a paragraph boundary in the DOS data
  4463.         segment, which may be determined by inspecting the segment
  4464.         pointers of the vectors for those of interrupts 02h, 08h-0Eh,
  4465.         70h, 72-77h which have not been redirected by device drivers or
  4466.         TSRs.
  4467.     DOS 4+    Identified by sub-segment control block type "S" within the DOS
  4468.         data segment.
  4469. SeeAlso: INT B4"STACKMAN"
  4470.  
  4471. Format of array elements in STACKS data segment:
  4472. Offset    Size    Description
  4473.  00h    BYTE    status: 00h=free, 01h=in use, 03h=corrupted by overflow of
  4474.         higher stack.
  4475.  01h    BYTE    not used
  4476.  02h    WORD    previous SP
  4477.  04h    WORD    previous SS
  4478.  06h    WORD    ptr to word at top of stack (new value for SP). The word at the
  4479.         top of the stack is preset to point back to this control block.
  4480.  
  4481. SHARE.EXE hooks (DOS 3.1-6.00):
  4482. (offsets from first system file table--pointed at by ListOfLists+04h)
  4483. Offset    Size    Description
  4484. -3Ch    DWORD    pointer to FAR routine for ???
  4485.         Note: not called by MS-DOS 3.3, set to 0000h:0000h by
  4486.             SHARE 3.3+
  4487. -38h    DWORD    pointer to FAR routine called on opening file
  4488.         on call, internal DOS location points at filename(see AX=5D06h)
  4489.         Return: CF clear if successful
  4490.             CF set on error
  4491.                 AX = DOS error code (24h) (see AH=59h)
  4492.         Note: SHARE directly accesses DOS-internal data to get name of
  4493.             file just opened
  4494. -34h    DWORD    pointer to FAR routine called on closing file
  4495.         ES:DI -> system file table
  4496.         Note: does something to every Record Lock Record for file
  4497. -30h    DWORD    pointer to FAR routine to close all files for given computer
  4498.         (called by AX=5D03h)
  4499. -2Ch    DWORD    pointer to FAR routine to close all files for given process
  4500.         (called by AX=5D04h)
  4501. -28h    DWORD    pointer to FAR routine to close file by name
  4502.         (called by AX=5D02h)
  4503.         DS:SI -> DOS parameter list (see AX=5D00h)
  4504.            DPL's DS:DX -> name of file to close
  4505.         Return: CF clear if successful
  4506.             CF set on error
  4507.                 AX = DOS error code (03h) (see AH=59h)
  4508. -24h    DWORD    pointer to FAR routine to lock region of file
  4509.         call with BX = file handle
  4510.               ---DOS 3.x---
  4511.               CX:DX = starting offset
  4512.               SI:AX = size
  4513.               ---DOS 4+---
  4514.               DS:DX -> lock range
  4515.                     DWORD start offset
  4516.                     DWORD size in bytes
  4517.         Return: CF set on error
  4518.                 AL = DOS error code (21h) (see AH=59h)
  4519.         Note: not called if file is marked as remote
  4520. -20h    DWORD    pointer to FAR routine to unlock region of file
  4521.         call with BX = file handle
  4522.               ---DOS 3.x---
  4523.               CX:DX = starting offset
  4524.               SI:AX = size
  4525.               ---DOS 4+---
  4526.               DS:DX -> lock range
  4527.                     DWORD start offset
  4528.                     DWORD size in bytes
  4529.         Return: CF set on error
  4530.                 AL = DOS error code (21h) (see AH=59h)
  4531.         Note: not called if file is marked as remote
  4532. -1Ch    DWORD    pointer to FAR routine to check if file region is locked
  4533.         call with ES:DI -> system file table entry for file
  4534.             CX = length of region from current position in file
  4535.         Return: CF set if any portion of region locked
  4536.                 AX = 0021h
  4537. -18h    DWORD    pointer to FAR routine to get open file list entry
  4538.         (called by AX=5D05h)
  4539.         call with DS:SI -> DOS parameter list (see AX=5D00h)
  4540.             DPL's BX = index of sharing record
  4541.             DPL's CX = index of SFT in SFT chain of sharing rec
  4542.         Return: CF set on error or not loaded
  4543.                 AX = DOS error code (12h) (see AH=59h)
  4544.             CF clear if successful
  4545.                 ES:DI -> filename
  4546.                 CX = number of locks owned by specified SFT
  4547.                 BX = network machine number
  4548.                 DX destroyed
  4549. -14h    DWORD    pointer to FAR routine for updating FCB from SFT???
  4550.         call with DS:SI -> unopened FCB
  4551.               ES:DI -> system file table entry
  4552.         Return: BL = C0h???
  4553.         Note: copies following fields from SFT to FCB:
  4554.            starting cluster of file      0Bh     1Ah
  4555.            sharing record offset      33h     1Ch
  4556.            file attribute          04h     1Eh
  4557. -10h    DWORD    pointer to FAR routine to get first cluster of FCB file ???
  4558.         call with ES:DI -> system file table entry
  4559.               DS:SI -> FCB
  4560.         Return: CF set if SFT closed or sharing record offsets
  4561.                 mismatched
  4562.             CF clear if successful
  4563.                 BX = starting cluster number from FCB
  4564. -0Ch    DWORD    pointer to FAR routine to close file if duplicate for process
  4565.         DS:SI -> system file table
  4566.         Return: AX = number of handle in JFT which already uses SFT
  4567.         Note: called during open/create of a file
  4568.         Note: if SFT was opened with inheritance enabled and sharing
  4569.             mode 111, does something to all other SFTs owned by
  4570.             same process which have the same file open mode and
  4571.             sharing record
  4572. -08h    DWORD    pointer to FAR routine for closing file
  4573.         Note: closes various handles referring to file most-recently
  4574.             opened
  4575. -04h    DWORD    pointer to FAR routine to update directory info in related SFT
  4576.           entries
  4577.         call with ES:DI -> system file table entry for file (see below)
  4578.               AX = subfunction (apply to each related SFT)
  4579.                 00h: update time stamp (offset 0Dh) and date
  4580.                      stamp (offset 0Fh)
  4581.                 01h: update file size (offset 11h) and starting
  4582.                      cluster (offset 0Bh).  Sets last-accessed
  4583.                      cluster fields to start of file if file
  4584.                      never accessed
  4585.                 02h: as function 01h, but last-accessed fields
  4586.                      always changed
  4587.                 03h: do both functions 00h and 02h
  4588.         Note: follows ptr at offset 2Bh in system file table entries
  4589.         Note: NOP if opened with no-inherit or via FCB
  4590. Notes:    most of the above hooks (except -04h, -14h, -18h, and -3Ch) assume
  4591.       either that SS=DOS DS or SS=DS=DOS DS and directly access
  4592.       DOS-internal data
  4593.     sharing hooks are not supported by DR-DOS 5-6; will reportedly be
  4594.       supported by Novell DOS 7
  4595.  
  4596. Format of sharing record:
  4597. Offset    Size    Description
  4598.  00h    BYTE    flag
  4599.         00h free block
  4600.         01h allocated block
  4601.         FFh end marker
  4602.  01h    WORD    size of block
  4603.  03h    BYTE    checksum of pathname (including NUL)
  4604.         if sum of ASCII values is N, checksum is (N/256 + N%256)
  4605.  04h    WORD    offset in SHARE's DS of first Record Lock Record (see below)
  4606.  06h    DWORD    pointer to start of system file table chain for file
  4607.  0Ah    WORD    unique sequence number
  4608.  0Ch    var    ASCIZ full pathname
  4609. Note:    not supported by DR-DOS SHARE 1.1 and 2.0; will reportedly be
  4610.       supported by Novell DOS 7
  4611.  
  4612. Format of Record Lock Record (SHARE.EXE):
  4613. Offset    Size    Description
  4614.  00h    WORD    offset in SHARE's DS of next lock table in list or 0000h
  4615.  02h    DWORD    offset in file of start of locked region
  4616.  06h    DWORD    offset in file of end of locked region
  4617.  0Ah    DWORD    pointer to System File Table entry for this file
  4618.  0Eh    WORD    PSP segment of lock's owner
  4619. ---DOS 5+ ---
  4620.  10h    WORD    lock type: (00h lock all, 01h lock writes only)
  4621.  
  4622. Format of DOS 2.x system file tables:
  4623. Offset    Size    Description
  4624.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  4625.  04h    WORD    number of files in this table
  4626.  06h  28h bytes per file
  4627.     Offset    Size    Description
  4628.      00h    BYTE    number of file handles referring to this file
  4629.      01h    BYTE    file open mode (see AH=3Dh)
  4630.      02h    BYTE    file attribute
  4631.      03h    BYTE    drive (0 = character device, 1 = A, 2 = B, etc)
  4632.      04h 11 BYTEs    filename in FCB format (no path,no period,blank-padded)
  4633.      0Fh    WORD    ???
  4634.      11h    WORD    ???
  4635.      13h    DWORD    file size???
  4636.      17h    WORD    file date in packed format (see AX=5700h)
  4637.      19h    WORD    file time in packed format (see AX=5700h)
  4638.      1Bh    BYTE    device attribute (see AX=4400h)
  4639.     ---character device---
  4640.      1Ch    DWORD    pointer to device driver
  4641.     ---block device---
  4642.      1Ch    WORD    starting cluster of file
  4643.      1Eh    WORD    relative cluster in file of last cluster accessed
  4644.     ------
  4645.      20h    WORD    absolute cluster number of current cluster
  4646.      22h    WORD    ???
  4647.      24h    DWORD    current file position???
  4648.  
  4649. Format of DOS 3.0 system file tables and FCB tables:
  4650. Offset    Size    Description
  4651.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  4652.  04h    WORD    number of files in this table
  4653.  06h  38h bytes per file
  4654.     Offset    Size    Description
  4655.      00h-1Eh as for DOS 3.1+ (see below)
  4656.      1Fh    WORD    byte offset of directory entry within sector
  4657.      21h 11 BYTES    filename in FCB format (no path/period, blank-padded)
  4658.      2Ch    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  4659.      30h    WORD    (SHARE.EXE) network machine number which opened file
  4660.             (Windows Enhanced mode DOSMGR uses the virtual machine
  4661.             ID as the machine number; see INT 2F/AX=1683h)
  4662.      32h    WORD    PSP segment of file's owner (first three entries for
  4663.             AUX/CON/PRN contain segment of IO.SYS startup code)
  4664.      34h    WORD    (SHARE.EXE) offset in SHARE code seg of share record
  4665.      36h    WORD    ??? apparently always 0000h
  4666.  
  4667. Format of DOS 3.1-3.3x, DR-DOS 5.0-6.0 system file tables and FCB tables:
  4668. Offset    Size    Description
  4669.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  4670.  04h    WORD    number of files in this table
  4671.  06h  35h bytes per file
  4672.     Offset    Size    Description
  4673.      00h    WORD    number of file handles referring to this file
  4674.      02h    WORD    file open mode (see AH=3Dh)
  4675.             bit 15 set if this file opened via FCB
  4676.      04h    BYTE    file attribute (see AX=4301h)
  4677.      05h    WORD    device info word (see AX=4400h)
  4678.             bit 15 set if remote file
  4679.             bit 14 set means do not set file date/time on closing
  4680.             bit 12 set means don't inherit on EXEC
  4681.             bits 5-0 drive number for disk files
  4682.      07h    DWORD    pointer to device driver header if character device
  4683.             else pointer to DOS Drive Parameter Block (see AH=32h)
  4684.      0Bh    WORD    starting cluster of file
  4685.      0Dh    WORD    file time in packed format (see AX=5700h)
  4686.             not used for character devices in DR-DOS
  4687.      0Fh    WORD    file date in packed format (see AX=5700h)
  4688.             not used for character devices in DR-DOS
  4689.      11h    DWORD    file size
  4690.     ---system file table---
  4691.      15h    DWORD    current offset in file (may be larger than size of
  4692.             file; INT 21/AH=42h does not check new position)
  4693.     ---FCB table---
  4694.      15h    WORD    counter for last I/O to FCB
  4695.      17h    WORD    counter for last open of FCB
  4696.             (these are separate to determine the times of the
  4697.             latest I/O and open)
  4698.     ---
  4699.      19h    WORD    relative cluster within file of last cluster accessed
  4700.      1Bh    WORD    absolute cluster number of last cluster accessed
  4701.             0000h if file never read or written???
  4702.      1Dh    WORD    number of sector containing directory entry
  4703.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  4704.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  4705.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  4706.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  4707.             (Windows Enhanced mode DOSMGR uses the virtual machine
  4708.             ID as the machine number; see INT 2F/AX=1683h)
  4709.      31h    WORD    PSP segment of file's owner (see AH=26h) (first three
  4710.             entries for AUX/CON/PRN contain segment of IO.SYS
  4711.             startup code)
  4712.      33h    WORD    offset within SHARE.EXE code segment of
  4713.             sharing record (see above)  0000h = none
  4714.  
  4715. Format of DOS 4.0-6.0 system file tables and FCB tables:
  4716. Offset    Size    Description
  4717.  00h    DWORD    pointer to next file table (offset FFFFh if last)
  4718.  04h    WORD    number of files in this table
  4719.  06h  3Bh bytes per file
  4720.     Offset    Size    Description
  4721.      00h    WORD    number of file handles referring to this file
  4722.             FFFFh if in use but not referenced
  4723.      02h    WORD    file open mode (see AH=3Dh)
  4724.             bit 15 set if this file opened via FCB
  4725.      04h    BYTE    file attribute (see AX=4301h)
  4726.      05h    WORD    device info word (see also AX=4400h)
  4727.             bit 15 set if remote file
  4728.             bit 14 set means do not set file date/time on closing
  4729.             bit 13 set if named pipe
  4730.             bit 12 set if no inherit
  4731.             bit 11 set if network spooler
  4732.             bit 7  set if device, clear if file (only if local)
  4733.             bits 6-0 as for AX=4400h
  4734.      07h    DWORD    pointer to device driver header if character device
  4735.             else pointer to DOS Drive Parameter Block (see AH=32h)
  4736.             or REDIR data
  4737.      0Bh    WORD    starting cluster of file (local files only)
  4738.      0Dh    WORD    file time in packed format (see AX=5700h)
  4739.      0Fh    WORD    file date in packed format (see AX=5700h)
  4740.      11h    DWORD    file size
  4741.      15h    DWORD    current offset in file (SFT)
  4742.             LRU counters (FCB table, two WORDs)
  4743.     ---local file---
  4744.      19h    WORD    relative cluster within file of last cluster accessed
  4745.      1Bh    DWORD    number of sector containing directory entry
  4746.      1Fh    BYTE    number of dir entry within sector (byte offset/32)
  4747.     ---network redirector---
  4748.      19h    DWORD    pointer to REDIRIFS record
  4749.      1Dh  3 BYTEs    ???
  4750.     ------
  4751.      20h 11 BYTEs    filename in FCB format (no path/period, blank-padded)
  4752.      2Bh    DWORD    (SHARE.EXE) pointer to previous SFT sharing same file
  4753.      2Fh    WORD    (SHARE.EXE) network machine number which opened file
  4754.             (Windows Enhanced mode DOSMGR uses the virtual machine
  4755.             ID as the machine number; see INT 2F/AX=1683h)
  4756.      31h    WORD    PSP segment of file's owner (see AH=26h) (first three
  4757.             entries for AUX/CON/PRN contain segment of IO.SYS
  4758.             startup code)
  4759.      33h    WORD    offset within SHARE.EXE code segment of
  4760.             sharing record (see above)  0000h = none
  4761.      35h    WORD    (local) absolute cluster number of last clustr accessed
  4762.             (redirector) ???
  4763.      37h    DWORD    pointer to IFS driver for file, 0000000h if native DOS
  4764. Note:    the OS/2 2.0 DOS Boot Session does not properly fill in the filename
  4765.       field due to incomplete support for SFTs; the OS/2 2.0 DOS Window
  4766.       does not appear to support SFTs at all
  4767.  
  4768. Format of current directory structure (CDS) (array, LASTDRIVE entries):
  4769. Offset    Size    Description
  4770.  00h 67 BYTEs    ASCIZ path in form X:\PATH (local) or \\MACH\PATH (network)
  4771.  43h    WORD    drive attributes (see also note below and AX=5F07h)
  4772.         bit 15: uses network redirector     \ invalid if 00, installable
  4773.         bit 14: physical drive         / file system if 11
  4774.         bit 13: JOIN'ed      \ path above is true path that would be
  4775.         bit 12: SUBST'ed  / needed if not under SUBST or JOIN
  4776.         bit  7: remote drive hidden from redirector's assign-list and
  4777.               exempt from network connection make/break commands;
  4778.               set for CD-ROM drives
  4779.  45h    DWORD    pointer to Drive Parameter Block for drive (see AH=32h)
  4780. ---local drives---
  4781.  49h    WORD    starting cluster of current directory
  4782.         0000h = root, FFFFh = never accessed
  4783.  4Bh    WORD    ??? seems to be FFFFh always
  4784.  4Dh    WORD    ??? seems to be FFFFh always
  4785. ---network drives---
  4786.  49h    DWORD    pointer to redirector or REDIRIFS record, or FFFFh:FFFFh
  4787.         (DOS 4 only) available for use by IFS driver
  4788.  4Dh    WORD    stored user data from INT 21/AX=5F03h
  4789. ------
  4790.  4Fh    WORD    offset in current directory path of backslash corresponding to
  4791.           root directory for drive
  4792.         this value specifies how many characters to hide from the
  4793.           "CHDIR" and "GETDIR" calls; normally set to 2 to hide the
  4794.           drive letter and colon, SUBST, JOIN, and networks change it
  4795.           so that only the appropriate portion of the true path is
  4796.           visible to the user
  4797. ---DOS 4+ ---
  4798.  51h    BYTE    (DOS 4 only, remote drives) device type
  4799.         04h network drive
  4800.  52h    DWORD    pointer to IFS driver (DOS 4) or redirector block (DOS 5+) for
  4801.         this drive, 00000000h if native DOS
  4802.  56h    WORD    available for use by IFS driver
  4803. Notes:    the path for invalid drives is normally set to X:\, but may be empty
  4804.       after JOIN x: /D in DR-DOS 5.0 or NET USE x: /D in older LAN versions
  4805.     normally, only one of bits 13&12 may be set together with bit 14, but
  4806.       DR-DOS 5.0 uses other combinations for bits 15-12: 0111 JOIN,
  4807.       0001 SUBST, 0101 ASSIGN (see below)
  4808.  
  4809. Format of DR-DOS 5.0-6.0 current directory structure entry (array):
  4810. Offset    Size    Description
  4811.  00h 67 BYTEs    ASCIZ pathname of actual root directory for this logical drive
  4812.  43h    WORD    drive attributes
  4813.         1000h SUBSTed drive
  4814.         3000h??? JOINed drive
  4815.         4000h physical drive
  4816.         5000h ASSIGNed drive
  4817.         7000h JOINed drive
  4818.         8000h network drive
  4819.  45h    BYTE    physical drive number (0=A:) if this logical drive is valid
  4820.  46h    BYTE    ??? apparently flags for JOIN and ASSIGN
  4821.  47h    WORD    cluster number of start of parent directory (0000h = root)
  4822.  49h    WORD    entry number of current directory in parent directory
  4823.  4Bh    WORD    cluster number of start of current directory
  4824.  4Dh    WORD    used for media change detection (details not available)
  4825.  4Fh    WORD    cluster number of SUBST/JOIN "root" directory
  4826.         0000h if physical root directory
  4827.  
  4828. Format of device driver header:
  4829. Offset    Size    Description
  4830.  00h    DWORD    pointer to next driver, offset=FFFFh if last driver
  4831.  04h    WORD    device attributes
  4832.         Character device:
  4833.            bit 15 set (indicates character device)
  4834.            bit 14 IOCTL supported (see AH=44h)
  4835.            bit 13 (DOS 3+) output until busy supported
  4836.            bit 12 reserved
  4837.            bit 11 (DOS 3+) OPEN/CLOSE/RemMedia calls supported
  4838.            bits 10-8 reserved
  4839.            bit 7  (DOS 5+) Generic IOCTL check call supported (cmd 19h)
  4840.                 (see AX=4410h,AX=4411h)
  4841.            bit 6  (DOS 3.2+) Generic IOCTL call supported (command 13h)
  4842.                 (see AX=440Ch,AX=440Dh)
  4843.            bit 5  reserved
  4844.            bit 4  device is special (use INT 29 "fast console output")
  4845.            bit 3  device is CLOCK$ (all reads/writes use transfer
  4846.                 record described below)
  4847.            bit 2  device is NUL
  4848.            bit 1  device is standard output
  4849.            bit 0  device is standard input
  4850.         Block device:
  4851.            bit 15 clear (indicates block device)
  4852.            bit 14 IOCTL supported
  4853.            bit 13 non-IBM format
  4854.            bit 12 network device (device is remote)
  4855.            bit 11 (DOS 3+) OPEN/CLOSE/RemMedia calls supported
  4856.            bit 10 reserved
  4857.            bit 9  direct I/O not allowed???
  4858.               (set by DOS 3.3 DRIVER.SYS for "new" drives)
  4859.            bit 8  ??? set by DOS 3.3 DRIVER.SYS for "new" drives
  4860.            bit 7  (DOS 5+) Generic IOCTL check call supported (cmd 19h)
  4861.                 (see AX=4410h,AX=4411h)
  4862.            bit 6  (DOS 3.2+) Generic IOCTL call supported (command 13h)
  4863.                 implies support for commands 17h and 18h
  4864.                 (see AX=440Ch,AX=440Dh,AX=440Eh,AX=440Fh)
  4865.            bits 5-2 reserved
  4866.            bit 1   driver supports 32-bit sector addressing (DOS 3.31+)
  4867.            bit 0   reserved
  4868.         Note: for European MS-DOS 4.0, bit 11 also indicates that bits
  4869.             8-6 contain a version code (000 = DOS 3.0,3.1;
  4870.             001 = DOS 3.2, 010 = European DOS 4.0)
  4871.  06h    WORD    device strategy entry point
  4872.         call with ES:BX -> request header (see INT 2F/AX=0802h)
  4873.  08h    WORD    device interrupt entry point
  4874. ---character device---
  4875.  0Ah  8 BYTEs    blank-padded character device name
  4876. ---block device---
  4877.  0Ah    BYTE    number of subunits (drives) supported by driver
  4878.  0Bh  7 BYTEs    unused
  4879. ---
  4880.  12h    WORD    (CD-ROM driver) reserved, must be 0000h
  4881.         appears to be another device chain
  4882.  14h    BYTE    (CD-ROM driver) drive letter (must initially be 00h)
  4883.  15h    BYTE    (CD-ROM driver) number of units
  4884.  16h  6 BYTEs    (CD-ROM driver) signature 'MSCDnn' where 'nn' is version
  4885.             (currently '00')
  4886.  
  4887. Format of CLOCK$ transfer record:
  4888. Offset    Size    Description
  4889.  00h    WORD    number of days since 1-Jan-1980
  4890.  02h    BYTE    minutes
  4891.  03h    BYTE    hours
  4892.  04h    BYTE    hundredths of second
  4893.  05h    BYTE    seconds
  4894.  
  4895. Format of DOS 2.x disk buffer:
  4896. Offset    Size    Description
  4897.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  4898.         least-recently used buffer is first in chain
  4899.  04h    BYTE    drive (0=A, 1=B, etc), FFh if not in use
  4900.  05h  3 BYTEs    unused??? (seems always to be 00h 00h 01h)
  4901.  08h    WORD    logical sector number
  4902.  0Ah    BYTE    number of copies to write (1 for non-FAT sectors)
  4903.  0Bh    BYTE    sector offset between copies if multiple copies to be written
  4904.  0Ch    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  4905.  10h        buffered data
  4906.  
  4907. Format of DOS 3.x disk buffer:
  4908. Offset    Size    Description
  4909.  00h    DWORD    pointer to next disk buffer, offset = FFFFh if last
  4910.         least-recently used buffer is first in chain
  4911.  04h    BYTE    drive (0=A,1=B, etc), FFh if not in use
  4912.  05h    BYTE    buffer flags
  4913.         bit 7: ???
  4914.         bit 6: buffer dirty
  4915.         bit 5: buffer has been referenced
  4916.         bit 4: ???
  4917.         bit 3: sector in data area
  4918.         bit 2: sector in a directory, either root or subdirectory
  4919.         bit 1: sector in FAT
  4920.         bit 0: boot sector??? (guess)
  4921.  06h    WORD    logical sector number
  4922.  08h    BYTE    number of copies to write (1 for non-FAT sectors)
  4923.  09h    BYTE    sector offset between copies if multiple copies to be written
  4924.  0Ah    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  4925.  0Eh    WORD    unused??? (almost always 0)
  4926.  10h        buffered data
  4927.  
  4928. Format of DOS 4.00 (pre UR 25066) disk buffer info:
  4929. Offset    Size    Description
  4930.  00h    DWORD    pointer to array of disk buffer hash chain heads (see below)
  4931.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  4932.  06h    DWORD    pointer to lookahead buffer, zero if not present
  4933.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  4934.  0Ch    BYTE    00h if buffers in EMS (/X), FFh if not
  4935.  0Dh    WORD    EMS handle for buffers, zero if not in EMS
  4936.  0Fh    WORD    EMS physical page number used for buffers (usually 255)
  4937.  11h    WORD    ??? seems always to be 0001h
  4938.  13h    WORD    segment of EMS physical page frame
  4939.  15h    WORD    ??? seems always to be zero
  4940.  17h  4 WORDs    EMS partial page mapping information???
  4941.  
  4942. Format of DOS 4.01 (from UR 25066 Corrctive Services Disk on) disk buffer info:
  4943. Offset    Size    Description
  4944.  00h    DWORD    pointer to array of disk buffer hash chain heads (see below)
  4945.  04h    WORD    number of disk buffer hash chains (referred to as NDBCH below)
  4946.  06h    DWORD    pointer to lookahead buffer, zero if not present
  4947.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  4948.  0Ch    BYTE    01h, possibly to distinguish from pre-UR 25066 format
  4949.  0Dh    WORD    ??? EMS segment for BUFFERS (only with /XD)
  4950.  0Fh    WORD    ??? EMS physical page number of EMS seg above (only with /XD)
  4951.  11h    WORD    ??? EMS segment for ??? (only with /XD)
  4952.  13h    WORD    ??? EMS physical page number of above (only with /XD)
  4953.  15h    BYTE    ??? number of EMS page frames present (only with /XD)
  4954.  16h    WORD    segment of one-sector workspace buffer allocated in main memory
  4955.           if BUFFERS/XS or /XD options in effect, possibly to avoid DMA
  4956.           into EMS
  4957.  18h    WORD    EMS handle for buffers, zero if not in EMS
  4958.  1Ah    WORD    EMS physical page number used for buffers (usually 255)
  4959.  1Ch    WORD    ??? appears always to be 0001h
  4960.  1Eh    WORD    segment of EMS physical page frame
  4961.  20h    WORD    ??? appears always to be zero
  4962.  22h    BYTE    00h if /XS, 01h if /XD, FFh if BUFFERS not in EMS
  4963.  
  4964. Format of DOS 4.x disk buffer hash chain head (array, one entry per chain):
  4965. Offset    Size    Description
  4966.  00h    WORD    EMS logical page number in which chain is resident, -1 if not
  4967.         in EMS
  4968.  02h    DWORD    pointer to least recently used buffer header.  All buffers on
  4969.         this chain are in the same segment.
  4970.  06h    BYTE    number of dirty buffers on this chain
  4971.  07h    BYTE    reserved (00h)
  4972. Notes:    buffered disk sectors are assigned to chain N where N is the sector's
  4973.       address modulo NDBCH,     0 <= N <= NDBCH-1
  4974.     each chain resides completely within one EMS page
  4975.     this structure is in main memory even if buffers are in EMS
  4976.  
  4977. Format of DOS 4.0-6.0 disk buffer:
  4978. Offset    Size    Description
  4979.  00h    WORD    forward ptr, offset only, to next least recently used buffer
  4980.  02h    WORD    backward ptr, offset only
  4981.  04h    BYTE    drive (0=A,1=B, etc) if bit 7 clear
  4982.         SFT index if bit 7 set
  4983.         FFh if not in use
  4984.  05h    BYTE    buffer flags
  4985.         bit 7: remote buffer
  4986.         bit 6: buffer dirty
  4987.         bit 5: buffer has been referenced (reserved in DOS 5+)
  4988.         bit 4: search data buffer (only valid if remote buffer)
  4989.         bit 3: sector in data area
  4990.         bit 2: sector in a directory, either root or subdirectory
  4991.         bit 1: sector in FAT
  4992.         bit 0: reserved
  4993.  06h    DWORD    logical sector number (local buffers only)
  4994.  0Ah    BYTE    number of copies to write
  4995.         for FAT sectors, same as number of FATs
  4996.         for data and directory sectors, usually 1
  4997.  0Bh    WORD    offset in sectors between copies to write for FAT sectors
  4998.  0Dh    DWORD    pointer to DOS Drive Parameter Block (see AH=32h)
  4999.  11h    WORD    size of data in buffer if remote buffer (see flags above)
  5000.  13h    BYTE    reserved (padding)
  5001.  14h        buffered data
  5002. Note:    for DOS 4.x, all buffered sectors which have the same hash value
  5003.       (computed as the sum of high and low words of the logical sector
  5004.       number divided by the number of disk buffer chains) are on the same
  5005.       doubly-linked circular chain; for DOS 5+, only a single circular
  5006.       chain exists.
  5007.     the links consist of offset addresses only, the segment being the same
  5008.       for all buffers in the chain.
  5009.  
  5010. Format of DOS 5.0-6.0 disk buffer info:
  5011. Offset    Size    Description
  5012.  00h    DWORD    pointer to least-recently-used buffer header (may be in HMA)
  5013.         (see above)
  5014.  04h    WORD    number of dirty disk buffers
  5015.  06h    DWORD    pointer to lookahead buffer, zero if not present
  5016.  0Ah    WORD    number of lookahead sectors, else zero (the y in BUFFERS=x,y)
  5017.  0Ch    BYTE    buffer location
  5018.         00h base memory, no workspace buffer
  5019.         01h HMA, workspace buffer in base memory
  5020.  0Dh    DWORD    pointer to one-segment workspace buffer in base memory
  5021.  11h  3 BYTEs    unused
  5022.  14h    WORD    ???
  5023.  16h    BYTE    flag: INT 24 fail while making an I/O status call
  5024.  17h    BYTE    temp storage for user memory allocation strategy during EXEC
  5025.  18h    BYTE    counter: number of INT 21 calls for which A20 is off
  5026.  19h    BYTE    bit flags
  5027.         bit 0: ???
  5028.         bit 1: SWITCHES=/W specified in CONFIG.SYS (don't load
  5029.             WINA20.SYS when MS Windows 3.0 starts)
  5030.         bit 2: in EXEC state (INT 21/AX=4B05h)
  5031.  1Ah    WORD    offset of unpack code start (used only during INT 21/AX=4B05h)
  5032.  1Ch    BYTE    bit 0 set iff UMB MCB chain linked to normal MCB chain
  5033.  1Dh    WORD    minimum paragraphs of memory required by program being EXECed
  5034.  1Fh    WORD    segment of first MCB in upper memory blocks or FFFFh if DOS
  5035.         memory chain in base 640K only (first UMB MCB usually at 9FFFh,
  5036.         locking out video memory with a DOS-owned memory block)
  5037.  21h    WORD    paragraph from which to start scanning during memory allocation
  5038.  
  5039. Format of IFS driver list:
  5040. Offset    Size    Description
  5041.  00h    DWORD    pointer to next driver header
  5042.  04h  8 BYTEs    IFS driver name (blank padded), as used by FILESYS command
  5043.  0Ch  4 BYTEs    ???
  5044.  10h    DWORD    pointer to IFS utility function entry point (see below)
  5045.         call with ES:BX -> IFS request (see below)
  5046.  14h    WORD    offset in header's segment of driver entry point
  5047.     ???
  5048.  
  5049. Call IFS utility function entry point with:
  5050.     AH = 20h miscellaneous functions
  5051.         AL = 00h get date
  5052.         Return: CX = year
  5053.             DH = month
  5054.             DL = day
  5055.         AL = 01h get process ID and computer ID
  5056.         Return: BX = current PSP segment
  5057.             DX = active network machine number
  5058.         AL = 05h get file system info
  5059.         ES:DI -> 16-byte info buffer
  5060.         Return: buffer filled
  5061.             Offset    Size    Description
  5062.              00h  2 BYTEs    unused
  5063.              02h    WORD    number of SFTs (actually counts only
  5064.                     the first two file table arrays)
  5065.              04h    WORD    number of FCB table entries
  5066.              06h    WORD    number of proctected FCBs
  5067.              08h  6 BYTEs    unused
  5068.              0Eh    WORD    largest sector size supported
  5069.         AL = 06h get machine name
  5070.         ES:DI -> 18-byte buffer for name
  5071.         Return: buffer filled with name starting at offset 02h
  5072.         AL = 08h get sharing retry count
  5073.         Return: BX = sharing retry count
  5074.         AL = other
  5075.         Return: CF set
  5076.     AH = 21h get redirection state
  5077.         BH = type (03h disk, 04h printer)
  5078.         Return: BH = state (00h off, 01h on)
  5079.     AH = 22h ??? some sort of time calculation
  5080.         AL = 00h ???
  5081.             nonzero ???
  5082.     AH = 23h ??? some sort of time calculation
  5083.     AH = 24h compare filenames
  5084.         DS:SI -> first ASCIZ filename
  5085.         ES:DI -> second ASCIZ filename
  5086.         Return: ZF set if files are same ignoring case and / vs \
  5087.     AH = 25h normalize filename
  5088.         DS:SI -> ASCIZ filename
  5089.         ES:DI -> buffer for result
  5090.         Return: filename uppercased, forward slashes changed to backslashes
  5091.     AH = 26h get DOS stack
  5092.         Return: DS:SI -> top of stack
  5093.             CX = size of stack in bytes
  5094.     AH = 27h increment InDOS flag
  5095.     AH = 28h decrement InDOS flag
  5096. Note:    IFS drivers which do not wish to implement functions 20h or 24h-28h may
  5097.       pass them on to the default handler pointed at by [LoL+37h]
  5098.  
  5099. Format of IFS request block:
  5100. Offset    Size    Description
  5101.  00h    WORD    total size in bytes of request
  5102.  02h    BYTE    class of request
  5103.         02h ???
  5104.         03h redirection
  5105.         04h ???
  5106.         05h file access
  5107.         06h convert error code to string
  5108.         07h ???
  5109.  03h    WORD    returned DOS error code
  5110.  05h    BYTE    IFS driver exit status
  5111.         00h success
  5112.         01h ???
  5113.         02h ???
  5114.         03h ???
  5115.         04h ???
  5116.         FFh internal failure
  5117.  06h 16 BYTEs    ???
  5118. ---request class 02h---
  5119.  16h    BYTE    function code
  5120.         04h ???
  5121.  17h    BYTE    unused???
  5122.  18h    DWORD    pointer to ???
  5123.  1Ch    DWORD    pointer to ???
  5124.  20h  2 BYTEs    ???
  5125. ---request class 03h---
  5126.  16h    BYTE    function code
  5127.  17h    BYTE    ???
  5128.  18h    DWORD    pointer to ???
  5129.  1Ch    DWORD    pointer to ???
  5130.  22h    WORD    returned ???
  5131.  24h    WORD    returned ???
  5132.  26h    WORD    returned ???
  5133.  28h    BYTE    returned ???
  5134.  29h    BYTE    unused???
  5135. ---request class 04h---
  5136.  16h    DWORD    pointer to ???
  5137.  1Ah    DWORD    pointer to ???
  5138. ---request class 05h---
  5139.  16h    BYTE    function code
  5140.         01h flush disk buffers
  5141.         02h get disk space
  5142.         03h MKDIR
  5143.         04h RMDIR
  5144.         05h CHDIR
  5145.         06h delete file
  5146.         07h rename file
  5147.         08h search directory
  5148.         09h file open/create
  5149.         0Ah LSEEK
  5150.         0Bh read from file
  5151.         0Ch write to file
  5152.         0Dh lock region of file
  5153.         0Eh commit/close file
  5154.         0Fh get/set file attributes
  5155.         10h printer control
  5156.         11h ???
  5157.         12h process termination
  5158.         13h ???
  5159.     ---class 05h function 01h---
  5160.      17h  7 BYTEs    ???
  5161.      1Eh    DWORD    pointer to ???
  5162.      22h  4 BYTEs    ???
  5163.      26h    BYTE    ???
  5164.      27h    BYTE    ???
  5165.     ---class 05h function 02h---
  5166.      17h  7 BYTEs    ???
  5167.      1Eh    DWORD    pointer to ???
  5168.      22h  4 BYTEs    ???
  5169.      26h    WORD    returned total clusters
  5170.      28h    WORD    returned sectors per cluster
  5171.      2Ah    WORD    returned bytes per sector
  5172.      2Ch    WORD    returned available clusters
  5173.      2Eh    BYTE    returned ???
  5174.      2Fh    BYTE    ???
  5175.     ---class 05h functions 03h,04h,05h---
  5176.      17h  7 BYTEs    ???
  5177.      1Eh    DWORD    pointer to ???
  5178.      22h  4 BYTEs    ???
  5179.      26h    DWORD    pointer to directory name
  5180.     ---class 05h function 06h---
  5181.      17h  7 BYTEs    ???
  5182.      1Eh    DWORD    pointer to ???
  5183.      22h  4 BYTEs    ???
  5184.      26h    WORD    attribute mask
  5185.      28h    DWORD    pointer to filename
  5186.     ---class 05h function 07h---
  5187.      17h  7 BYTEs    ???
  5188.      1Eh    DWORD    pointer to ???
  5189.      22h  4 BYTEs    ???
  5190.      26h    WORD    attribute mask
  5191.      28h    DWORD    pointer to source filespec
  5192.      2Ch    DWORD    pointer to destination filespec
  5193.     ---class 05h function 08h---
  5194.      17h  7 BYTEs    ???
  5195.      1Eh    DWORD    pointer to ???
  5196.      22h  4 BYTEs    ???
  5197.      26h    BYTE    00h FINDFIRST
  5198.             01h FINDNEXT
  5199.      28h    DWORD    pointer to FindFirst search data + 01h if FINDNEXT
  5200.      2Ch    WORD    search attribute if FINDFIRST
  5201.      2Eh    DWORD    pointer to filespec if FINDFIRST
  5202.     ---class 05h function 09h---
  5203.      17h  7 BYTEs    ???
  5204.      1Eh    DWORD    pointer to ???
  5205.      22h    DWORD    pointer to IFS open file structure (see below)
  5206.      26h    WORD    ???  \ together, specify open vs. create, whether or
  5207.      28h    WORD    ???  / not to truncate
  5208.      2Ah  4 BYTEs    ???
  5209.      2Eh    DWORD    pointer to filename
  5210.      32h  4 BYTEs    ???
  5211.      36h    WORD    file attributes on call
  5212.             returned ???
  5213.      38h    WORD    returned ???
  5214.     ---class 05h function 0Ah---
  5215.      17h  7 BYTEs    ???
  5216.      1Eh    DWORD    pointer to ???
  5217.      22h    DWORD    pointer to IFS open file structure (see below)
  5218.      26h    BYTE    seek type (02h = from end)
  5219.      28h    DWORD    offset on call
  5220.             returned new absolute position
  5221.     ---class 05h functions 0Bh,0Ch---
  5222.      17h  7 BYTEs    ???
  5223.      1Eh    DWORD    pointer to ???
  5224.      22h    DWORD    pointer to IFS open file structure (see below)
  5225.      28h    WORD    number of bytes to transfer
  5226.             returned bytes actually transferred
  5227.      2Ah    DWORD    transfer address
  5228.     ---class 05h function 0Dh---
  5229.      17h  7 BYTEs    ???
  5230.      1Eh    DWORD    pointer to ???
  5231.      22h    DWORD    pointer to IFS open file structure (see below)
  5232.      26h    BYTE    file handle???
  5233.      27h    BYTE    unused???
  5234.      28h    WORD    ???
  5235.      2Ah    WORD    ???
  5236.      2Ch    WORD    ???
  5237.      2Eh    WORD    ???
  5238.     ---class 05h function 0Eh---
  5239.      17h  7 BYTEs    ???
  5240.      1Eh    DWORD    pointer to ???
  5241.      22h    DWORD    pointer to IFS open file structure (see below)
  5242.      26h    BYTE    00h commit file
  5243.             01h close file
  5244.      27h    BYTE    unused???
  5245.     ---class 05h function 0Fh---
  5246.      17h  7 BYTEs    ???
  5247.      1Eh    DWORD    pointer to ???
  5248.      22h  4 BYTEs    ???
  5249.      26h    BYTE    02h GET attributes
  5250.             03h PUT attributes
  5251.      27h    BYTE    unused???
  5252.      28h 12 BYTEs    ???
  5253.      34h    WORD    search attributes???
  5254.      36h    DWORD    pointer to filename
  5255.      3Ah    WORD    (GET) returned ???
  5256.      3Ch    WORD    (GET) returned ???
  5257.      3Eh    WORD    (GET) returned ???
  5258.      40h    WORD    (GET) returned ???
  5259.      42h    WORD    (PUT) new attributes
  5260.             (GET) returned attributes
  5261.     ---class 05h function 10h---
  5262.      17h  7 BYTEs    ???
  5263.      1Eh    DWORD    pointer to ???
  5264.      22h    DWORD    pointer to IFS open file structure (see below)
  5265.      26h    WORD    ???
  5266.      28h    DWORD    pointer to ???
  5267.      2Ch    WORD    ???
  5268.      2Eh    BYTE    ???
  5269.      2Fh    BYTE    subfunction
  5270.             01h get printer setup
  5271.             03h ???
  5272.             04h ???
  5273.             05h ???
  5274.             06h ???
  5275.             07h ???
  5276.             21h set printer setup
  5277.     ---class 05h function 11h---
  5278.      17h  7 BYTEs    ???
  5279.      1Eh    DWORD    pointer to ???
  5280.      22h    DWORD    pointer to IFS open file structure (see below)
  5281.      26h    BYTE    subfunction
  5282.      27h    BYTE    unused???
  5283.      28h    WORD    ???
  5284.      2Ah    WORD    ???
  5285.      2Ch    WORD    ???
  5286.      2Eh    BYTE    ???
  5287.      2Fh    BYTE    ???
  5288.     ---class 05h function 12h---
  5289.      17h 15 BYTEs    unused???
  5290.      26h    WORD    PSP segment
  5291.      28h    BYTE    type of process termination
  5292.      29h    BYTE    unused???
  5293.     ---class 05h function 13h---
  5294.      17h 15 BYTEs    unused???
  5295.      26h    WORD    PSP segment
  5296. ---request class 06h---
  5297.  16h    DWORD    returned pointer to string corresponding to error code at 03h
  5298.  1Ah    BYTE    returned ???
  5299.  1Bh    BYTE    unused
  5300. ---request class 07h---
  5301.  16h    DWORD    pointer to IFS open file structure (see below)
  5302.  1Ah    BYTE    ???
  5303.  1Bh    BYTE    unused???
  5304.  
  5305. Format of IFS open file structure:
  5306. Offset    Size    Description
  5307.  00h    WORD    ???
  5308.  02h    WORD    device info word
  5309.  04h    WORD    file open mode
  5310.  06h    WORD    ???
  5311.  08h    WORD    file attributes
  5312.  0Ah    WORD    owner's network machine number
  5313.  0Ch    WORD    owner's PSP segment
  5314.  0Eh    DWORD    file size
  5315.  12h    DWORD    current offset in file
  5316.  16h    WORD    file time
  5317.  18h    WORD    file date
  5318.  1Ah 11 BYTEs    filename in FCB format
  5319.  25h    WORD    ???
  5320.  27h    WORD    hash value of SFT address
  5321.         (low word of linear address + segment&F000h)
  5322.  29h  3 WORDs    network info from SFT
  5323.  2Fh    WORD    ???
  5324.  
  5325. Format of one item in DOS 4+ list of special program names:
  5326. Offset    Size    Description
  5327.  00h    BYTE    length of name (00h = end of list)
  5328.  01h  N BYTEs    name in format name.ext
  5329.  N    2 BYTEs    DOS version to return for program (major,minor)
  5330.         (see AH=30h,INT 2F/AX=122Fh)
  5331. ---DOS 4 only---
  5332.  N+2    BYTE    number of times to return fake version number (FFh = always)
  5333. Note:    if the name of the executable for the program making the DOS "get
  5334.       version" call matches one of the names in this list, DOS returns the
  5335.       specified version rather than the true version number
  5336. --------v-215252-----------------------------
  5337. INT 21 - VIRUS - "516"/"Leapfrog" - INSTALLATION CHECK
  5338.     AX = 5252h
  5339. Return: BX = FFEEh if resident
  5340. SeeAlso: AX=4BFFh"Cascade",AX=58CCh
  5341. --------D-2153-------------------------------
  5342. INT 21 - DOS 2+ internal - TRANSLATE BIOS PARAMETER BLOCK TO DRIVE PARAM BLOCK
  5343.     AH = 53h
  5344.     DS:SI -> BIOS Parameter Block (see below)
  5345.     ES:BP -> buffer for Drive Parameter Block (see AH=32h for format)
  5346. Return: ES:BP buffer filled
  5347. Note:    for DOS 3+, the cluster at which to start searching is set to 0000h
  5348.       and the number of free clusters is set to FFFFh (unknown)
  5349.  
  5350. Format of BIOS Parameter Block:
  5351. Offset    Size    Description
  5352.  00h    WORD    number of bytes per sector
  5353.  02h    BYTE    number of sectors per cluster
  5354.  03h    WORD    number of reserved sectors at start of disk
  5355.  05h    BYTE    number of FATs
  5356.  06h    WORD    number of entries in root directory
  5357.  08h    WORD    total number of sectors
  5358.         for DOS 4+, set to zero if partition >32M, then set DWORD at
  5359.           15h to actual number of sectors
  5360.  0Ah    BYTE    media ID byte
  5361.  0Bh    WORD    number of sectors per FAT
  5362. ---DOS 3+---
  5363.  0Dh    WORD    number of sectors per track
  5364.  0Fh    WORD    number of heads
  5365.  11h    DWORD    number of hidden sectors
  5366.  15h 11 BYTEs    reserved
  5367. ---DOS 4+ ---
  5368.  15h    DWORD    total number of sectors if word at 08h contains zero
  5369.  19h  6 BYTEs    ???
  5370.  1Fh    WORD    number of cylinders
  5371.  21h    BYTE    device type
  5372.  22h    WORD    device attributes (removable or not, etc)
  5373. ---DR-DOS 5+ ---
  5374.  15h    DWORD    total number of sectors if word at 08h contains zero
  5375.  19h  6 BYTEs    reserved
  5376. ---European MS-DOS 4.00---
  5377.  15h    DWORD    total number of sectors if word at 08h contains zero
  5378.         (however, this DOS does not actually implement >32M partitions)
  5379. --------D-2154-------------------------------
  5380. INT 21 - DOS 2+ - GET VERIFY FLAG
  5381.     AH = 54h
  5382. Return: AL = verify flag
  5383.         00h off
  5384.         01h on (all disk writes verified after writing)
  5385. SeeAlso: AH=2Eh
  5386. --------D-2155-------------------------------
  5387. INT 21 - DOS 2+ internal - CREATE CHILD PSP
  5388.     AH = 55h
  5389.     DX = segment at which to create new PSP
  5390.     SI = (DOS 3+) value to place in memory size field at DX:[0002h]
  5391. Return: CF clear if successful
  5392.  
  5393. Notes:    creates a "child" PSP rather than making an exact copy of the current
  5394.       PSP; the new PSP's parent pointer is set to the current PSP and the
  5395.       reference count for each inherited file is incremented
  5396.     (DOS 2+) sets current PSP to DX
  5397.     (DOS 3+) marks "no inherit" file handles as closed in child PSP
  5398. SeeAlso: AH=26h,AH=50h
  5399. --------D-2156-------------------------------
  5400. INT 21 - DOS 2+ - "RENAME" - RENAME FILE
  5401.     AH = 56h
  5402.     DS:DX -> ASCIZ filename of existing file (no wildcards, but see below)
  5403.     ES:DI -> ASCIZ new filename (no wildcards)
  5404.     CL = attribute mask (server call only, see below)
  5405. Return: CF clear if successful
  5406.     CF set on error
  5407.         AX = error code (02h,03h,05h,11h) (see AH=59h)
  5408. Notes:    allows move between directories on same logical volume
  5409.     does not set the archive attribute (see AX=4300h), which results in
  5410.       incremental backups not backing up the file under its new name
  5411.     open files should not be renamed
  5412.     (DOS 3+) allows renaming of directories
  5413.     (DOS 3.1+) wildcards are allowed if invoked via AX=5D00h, in which case
  5414.       error 12h (no more files) is returned on success, and both source and
  5415.       destination specs must be canonical (as returned by AH=60h).
  5416.       Wildcards in the destination are replaced by the corresponding char
  5417.       of each source file being renamed.  Under DOS 3.x, the call will fail
  5418.       if the destination wildcard is *.* or equivalent; under DR-DOS 5.0,
  5419.       the call will fail if any wildcards are used.     When invoked via
  5420.       AX=5D00h, only those files matching the attribute mask in CL are
  5421.       renamed.
  5422.     under the FlashTek X-32 DOS extender, the old-name pointer is in DS:EDX
  5423.       and the new-name pointer is in ES:EDI (DS must equal ES)
  5424. BUG:    under DR-DOS 3.41, this function will generate a new directory entry
  5425.       with the new name (including any wildcards) which can only be removed
  5426.       with a sector editor when invoked via AX=5D00h
  5427. SeeAlso: AH=17h,AX=4301h,AH=60h,AX=5D00h
  5428. --------D-215700-----------------------------
  5429. INT 21 - DOS 2+ - GET FILE'S DATE AND TIME
  5430.     AX = 5700h
  5431.     BX = file handle
  5432. Return: CF clear if successful
  5433.         CX = file's time
  5434.         bits 15-11: hours (0-23)
  5435.              10-5:  minutes
  5436.               4-0:  seconds/2
  5437.         DX = file's date
  5438.         bits 15-9: year - 1980
  5439.               8-5: month
  5440.               4-0: day
  5441.     CF set on error
  5442.         AX = error code (01h,06h) (see AH=59h)
  5443. Note:    under DR-DOS 3.41 and 5.0, this function returns 0 (no date/time) for
  5444.       character devices; MS-DOS returns date and time of opening
  5445. SeeAlso: AX=5701h
  5446. --------D-215701-----------------------------
  5447. INT 21 - DOS 2+ - SET FILE'S DATE AND TIME
  5448.     AX = 5701h
  5449.     BX = file handle
  5450.     CX = new time (see AX=5700h)
  5451.     DX = new date (see AX=5700h)
  5452. Return: CF clear if successful
  5453.     CF set on error
  5454.         AX = error code (01h,06h) (see AH=59h)
  5455. SeeAlso: AX=5700h
  5456. --------D-215702-----------------------------
  5457. INT 21 - DOS 4.x only - GET EXTENDED ATTRIBUTES FOR FILE
  5458.     AX = 5702h
  5459.     BX = file handle
  5460.     CX = size of result buffer or 0000h
  5461.     DS:SI -> EAP list (see below)
  5462.     ES:DI -> buffer for returned EAV list (see below)
  5463. Return: CF clear if successful
  5464.         CX = size of returned data
  5465.     CF set on error
  5466.         AX = error code (see AH=59h)
  5467. Desc:    get the current value of one or more extended attributes
  5468. Notes:    if CX=0000h on entry, ES:DI is ignored and no data is actually
  5469.       returned, only the amount of data which is available
  5470.     the default DOS 4 behavior is to return a single word of 0000h (no
  5471.       structures) in the result buffer if CX>=0002h on entry
  5472. SeeAlso: AX=5703h,AX=5704h,AH=6Eh,INT 2F/AX=112Dh
  5473.  
  5474. Format of EAP (extended attribute properties) list:
  5475. Offset    Size    Description
  5476.  00h    WORD    number of EAP structures following
  5477.  02h    var    array of EAP structures (see below)
  5478.  
  5479. Format of EAP (extended attribute property) structure:
  5480. Offset    Size    Description
  5481.  00h    BYTE    attribute type
  5482.         01h boolean (either 00h or 01h)
  5483.         02h number (BYTE, WORD, or DWORD)
  5484.         03h string
  5485.         04h date stamp
  5486.         05h time stamp
  5487.  01h    WORD    EAP flags (see below)
  5488.  03h    BYTE    size of reference string (name)
  5489.  04h  N BYTEs    reference string
  5490.  
  5491. Bitfields for EAP flags:
  5492.  bit 12 unchangeable
  5493.  bit 13 ignore
  5494.  bit 14 unchangeable
  5495.  bit 15 used by COMMAND.COM for code page, but not understood by ATTRIB
  5496.  
  5497. Format of EAV (extended attribute value) list:
  5498. Offset    Size    Description
  5499.  00h    WORD    number of EAV structures following
  5500.  02h    var    array of Extended Attribute Value structures
  5501.  
  5502. Format of Extended Attribute Value structures:
  5503. Offset    Size    Description
  5504.  00h  4 BYTEs    ???
  5505.  04h    BYTE    size of reference string
  5506.  05h    WORD    size of value
  5507.  07h    var    reference string
  5508.     var    value
  5509. ----------215702-----------------------------
  5510. INT 21 - OS/2 v1.1+ Family API - DosQFileInfo
  5511.     AX = 5702h
  5512.     BX = file handle
  5513.     CX = size of buffer for information
  5514.     DX = level of information
  5515.     ES:DI -> buffer for information
  5516. Return: CF clear if successful
  5517.     CF set on error
  5518.         AX = error code
  5519. SeeAlso: AX=5702h/BX=FFFFh,AX=5703h"OS/2"
  5520. ----------215702BXFFFF-----------------------
  5521. INT 21 - OS/2 v1.1+ Family API - DosQPathInfo
  5522.     AX = 5702h
  5523.     BX = FFFFh
  5524.     CX = size of buffer for information
  5525.     DX = level of information
  5526.     DS:SI -> filename
  5527.     ES:DI -> buffer for information
  5528. Return: CF clear if successful
  5529.     CF set on error
  5530.         AX = error code
  5531. SeeAlso: AX=5702h"OS/2",AX=5703h/BX=FFFFh
  5532. --------D-215703-----------------------------
  5533. INT 21 - DOS 4.x only - GET EXTENDED ATTRIBUTE PROPERTIES
  5534.     AX = 5703h
  5535.     BX = file handle
  5536.     CX = size of result buffer or 0000h
  5537.     ES:DI -> result buffer
  5538. Return: CF clear if successful
  5539.         CX = size of returned data
  5540.     CF set on error
  5541.         AX = error code (see AH=59h)
  5542.     ES:DI -> zero word (DOS 4.0) if CX >= 2 on entry
  5543. Desc:    get a list of the extended attributes which are defined for the
  5544.       specified file
  5545. Notes:    if CX=0000h on entry, ES:DI is ignored and no data is actually
  5546.       returned, only the amount of data which is available
  5547.     the default DOS 4 behavior is to return a trivial EAP list consisting
  5548.       of the single word 0000h (no EAP structures) if CX>=0002h on entry
  5549. SeeAlso: AX=5702h,AX=5704h,AH=6Eh,INT 2F/AX=112Dh
  5550. ----------215703-----------------------------
  5551. INT 21 - OS/2 v1.1+ Family API - DosSetFileInfo
  5552.     AX = 5703h
  5553.     BX = file handle
  5554.     CX = size of information buffer
  5555.     DX = level of information
  5556.     ES:DI -> information buffer
  5557. Return: CF clear if successful
  5558.     CF set on error
  5559.         AX = error code
  5560. SeeAlso: AX=5702h"OS/2",AX=5703h/BX=FFFFh
  5561. ----------215703BXFFFF-----------------------
  5562. INT 21 - OS/2 v1.1+ Family API - DosSetPathInfo
  5563.     AX = 5703h
  5564.     BX = FFFFh
  5565.     CX = size of information buffer
  5566.     DX = level of information
  5567.     DS:SI -> filename
  5568.     ES:DI -> information buffer
  5569. Return: CF clear if successful
  5570.     CF set on error
  5571.         AX = error code
  5572. SeeAlso: AX=5702h/BX=FFFFh,AX=5703h"OS/2"
  5573. --------D-215704-----------------------------
  5574. INT 21 - DOS 4.x only - SET EXTENDED ATTRIBUTES
  5575.     AX = 5704h
  5576.     BX = file handle
  5577.     ES:DI -> EAV list (see AX=5702h)
  5578. Return: CF clear if successful
  5579.     CF set on error
  5580.         AX = error code (see AH=59h)
  5581. Note:    the default DOS 4 behavior is to do nothing and return successfully
  5582. SeeAlso: AX=5702h,AX=5703h,INT 2F/AX=112Dh
  5583. ----------215757BX5757-----------------------
  5584. INT 21 U - IBM Genie - Resident Manager - INSTALLATION CHECK
  5585.     AX = 5757h
  5586.     BX = 5757h
  5587. Return: AX = 0000h if installed
  5588.         BX = ???
  5589.         DX = ???
  5590.         DS:SI -> list of 27 DWORD entry point addresses
  5591. Program: IBM Genie is a set of utility TSRs by Helix Software
  5592. Note:    other functions possible if BX <> 5757h, but details not yet available
  5593. ----------215758-----------------------------
  5594. INT 21 U - Headroom - API
  5595.     AX = 5758h
  5596.     BL = function
  5597.         00h ???
  5598.         01h get Headroom location
  5599.         Return: CF clear if installed
  5600.                 AX = PSP segment of Headroom TSR
  5601.                 BX = paragraphs of memory used by Headroom
  5602.             CF set if not (normal DOS return)
  5603.         Note:    this function is also used as an installation check
  5604.         02h get INT 21 handler
  5605.         Return: CF clear
  5606.             ES:BX -> Headroom's INT 21 handler
  5607.         Note: also sets unknown flag
  5608.         03h launch application???
  5609.         DS:SI -> 233-byte application record
  5610.         Return: ???
  5611.         04h ???
  5612.         ???
  5613.         Return: CF clear
  5614.         05h get swap directory
  5615.         Return: CF clear
  5616.             DX:AX -> ASCIZ swap directory name
  5617.         06h ???
  5618.         DX = ???
  5619.         Return: CF clear
  5620.         07h ???
  5621.         08h ???
  5622.         09h get current application
  5623.         Return: BX = application number
  5624.         0Ah ???
  5625.         DX = application number
  5626.         DS:SI = ???
  5627.         Return: ???
  5628.         0Bh ???
  5629.         0Ch ???
  5630.         DX = application number
  5631.         ???
  5632.         Return: ???
  5633.         0Dh ???
  5634.         DX = application number
  5635.         ???
  5636.         Return: ???
  5637.         0Eh get ???
  5638.         Return: CF clear
  5639.             AX = ???
  5640.         0Fh set ??? flag
  5641.         10h clear ??? flag
  5642.         11h find application by name
  5643.         DS:SI -> ASCIZ application name
  5644.         Return: CF clear
  5645.             AX = application number or FFFFh if not loaded
  5646.         12h ???
  5647.         DX = application number
  5648.         Return: CF clear
  5649.             ???
  5650.         13h ???
  5651.         Return: CF clear
  5652.         14h ???
  5653.         same as function 13h
  5654.         15h set ???
  5655.         DX = ???
  5656.         16h get ???
  5657.         Return: AX = ??? set by function 15h
  5658.         17h get ???
  5659.         Return: BX = ???
  5660.             CX = ??? (may be pointer in BX:CX)
  5661.         18h BUG: branches incorrectly due to fencepost error
  5662. Program: Headroom is a TSR/task switcher by Helix Software
  5663. SeeAlso: AX=4C57h,AX=5757h
  5664. --------D-2158-------------------------------
  5665. INT 21 - DOS 3+ - GET OR SET MEMORY ALLOCATION STRATEGY
  5666.     AH = 58h
  5667.     AL = subfunction
  5668.         00h get allocation strategy
  5669.         Return: AX = current strategy
  5670.                 00h low memory first fit
  5671.                 01h low memory best fit
  5672.                 02h low memory last fit
  5673.              ---DOS 5+ ---
  5674.                 40h high memory first fit
  5675.                 41h high memory best fit
  5676.                 42h high memory last fit
  5677.                 80h first fit, try high then low memory
  5678.                 81h best fit, try high then low memory
  5679.                 82h last fit, try high then low memory
  5680.         01h set allocation strategy
  5681.         BL = new allocation strategy (see above)
  5682.         BH = 00h (DOS 5+)
  5683. Return: CF clear if successful
  5684.     CF set on error
  5685.         AX = error code (01h) (see AH=59h)
  5686. Notes:    the Set subfunction accepts any value in BL for DOS 3.x and 4.x;
  5687.       2 or greater means last fit
  5688.     the Get subfunction returns the last value set
  5689.     setting an allocation strategy involving high memory does not
  5690.       automatically link in the UMB memory chain; this must be done
  5691.       explicitly with AX=5803h in order to actually allocate high memory
  5692.     a program which changes the allocation strategy should restore it
  5693.       before terminating
  5694.     Toshiba MS-DOS 2.11 supports subfunctions 00h and 01h
  5695.     DR-DOS 3.41 reportedly reverses subfunctions 00h and 01h
  5696. SeeAlso: AH=48h,AH=49h,AH=4Ah,INT 2F/AX=4310h,INT 67/AH=3Fh
  5697. --------D-2158-------------------------------
  5698. INT 21 - DOS 5+ - GET OR SET UMB LINK STATE
  5699.     AH = 58h
  5700.     AL = subfunction
  5701.         02h get UMB link state
  5702.         Return: AL = 00h UMBs not part of DOS memory chain
  5703.                = 01h UMBs in DOS memory chain
  5704.         03h set UMB link state
  5705.         BX = 0000h remove UMBs from DOS memory chain
  5706.            = 0001h add UMBs to DOS memory chain
  5707. Return: CF clear if successful
  5708.     CF set on error
  5709.         AX = error code (01h) (see AH=59h)
  5710. Note:    a program which changes the UMB link state should restore it before
  5711.       terminating
  5712. --------v-2158CC-----------------------------
  5713. INT 21 - VIRUS - "1067"/"Headcrash" - INSTALLATION CHECK
  5714.     AX = 58CCh
  5715. Return: CF clear if resident
  5716. SeeAlso: AX=5252h,AX=58DDh,AX=6969h
  5717. --------v-2158DD-----------------------------
  5718. INT 21 - VIRUS - "1067"/"Headcrash" - GET ORIGINAL INT 21h VECTOR
  5719.     AX = 58DDh
  5720. Return: CX = code segment of virus
  5721.     ES:BX = old INT 21h vector
  5722. SeeAlso: AX=5252h,AX=58CCh,AX=6969h
  5723. --------D-2159--BX0000-----------------------
  5724. INT 21 - DOS 3+ - GET EXTENDED ERROR INFORMATION
  5725.     AH = 59h
  5726.     BX = 0000h
  5727. Return: AX = extended error code (see below)
  5728.     BH = error class (see below)
  5729.     BL = recommended action (see below)
  5730.     CH = error locus (see below)
  5731.     ES:DI may be pointer (see error code list below)
  5732.     CL, DX, SI, BP, and DS destroyed
  5733. Notes:    functions available under DOS 2.x map the true DOS 3+ error code into
  5734.       one supported under DOS 2.x
  5735.     you should call this function to retrieve the true error code when an
  5736.       FCB or DOS 2.x call returns an error
  5737.     under DR-DOS 5.0, this function does not use any of the DOS-internal
  5738.       stacks and may thus be called at any time
  5739. SeeAlso: AH=59h/BX=0001h,AX=5D0Ah,INT 2F/AX=122Dh
  5740.  
  5741. Values for extended error code:
  5742.  00h (0)   no error
  5743.  01h (1)   function number invalid
  5744.  02h (2)   file not found
  5745.  03h (3)   path not found
  5746.  04h (4)   too many open files (no handles available)
  5747.  05h (5)   access denied
  5748.  06h (6)   invalid handle
  5749.  07h (7)   memory control block destroyed
  5750.  08h (8)   insufficient memory
  5751.  09h (9)   memory block address invalid
  5752.  0Ah (10)  environment invalid (usually >32K in length)
  5753.  0Bh (11)  format invalid
  5754.  0Ch (12)  access code invalid
  5755.  0Dh (13)  data invalid
  5756.  0Eh (14)  reserved
  5757.  0Fh (15)  invalid drive
  5758.  10h (16)  attempted to remove current directory
  5759.  11h (17)  not same device
  5760.  12h (18)  no more files
  5761. ---DOS 3+---
  5762.  13h (19)  disk write-protected
  5763.  14h (20)  unknown unit
  5764.  15h (21)  drive not ready
  5765.  16h (22)  unknown command
  5766.  17h (23)  data error (CRC)
  5767.  18h (24)  bad request structure length
  5768.  19h (25)  seek error
  5769.  1Ah (26)  unknown media type (non-DOS disk)
  5770.  1Bh (27)  sector not found
  5771.  1Ch (28)  printer out of paper
  5772.  1Dh (29)  write fault
  5773.  1Eh (30)  read fault
  5774.  1Fh (31)  general failure
  5775.  20h (32)  sharing violation
  5776.  21h (33)  lock violation
  5777.  22h (34)  disk change invalid
  5778.     ES:DI -> ASCIZ volume label of required disk
  5779.  23h (35)  FCB unavailable
  5780.  24h (36)  sharing buffer overflow
  5781.  25h (37)  (DOS 4+) code page mismatch
  5782.  26h (38)  (DOS 4+) cannot complete file operation (out of input)
  5783.  27h (39)  (DOS 4+) insufficient disk space
  5784.  28h-31h   reserved
  5785.  32h (50)  network request not supported
  5786.  33h (51)  remote computer not listening
  5787.  34h (52)  duplicate name on network
  5788.  35h (53)  network name not found
  5789.  36h (54)  network busy
  5790.  37h (55)  network device no longer exists
  5791.  38h (56)  network BIOS command limit exceeded
  5792.  39h (57)  network adapter hardware error
  5793.  3Ah (58)  incorrect response from network
  5794.  3Bh (59)  unexpected network error
  5795.  3Ch (60)  incompatible remote adapter
  5796.  3Dh (61)  print queue full
  5797.  3Eh (62)  queue not full
  5798.  3Fh (63)  not enough space to print file
  5799.  40h (64)  network name was deleted
  5800.  41h (65)  network: Access denied
  5801.  42h (66)  network device type incorrect
  5802.  43h (67)  network name not found
  5803.  44h (68)  network name limit exceeded
  5804.  45h (69)  network BIOS session limit exceeded
  5805.  46h (70)  temporarily paused
  5806.  47h (71)  network request not accepted
  5807.  48h (72)  network print/disk redirection paused
  5808.  49h (73)  network software not installed
  5809.        (LANtastic) invalid network version
  5810.  4Ah (74)  unexpected adapter close
  5811.        (LANtastic) account expired
  5812.  4Bh (75)  (LANtastic) password expired
  5813.  4Ch (76)  (LANtastic) login attempt invalid at this time
  5814.  4Dh (77)  (LANtastic v3+) disk limit exceeded on network node
  5815.  4Eh (78)  (LANtastic v3+) not logged in to network node
  5816.  4Fh (79)  reserved
  5817.  50h (80)  file exists
  5818.  51h (81)  reserved
  5819.  52h (82)  cannot make directory
  5820.  53h (83)  fail on INT 24h
  5821.  54h (84)  (DOS 3.3+) too many redirections
  5822.  55h (85)  (DOS 3.3+) duplicate redirection
  5823.  56h (86)  (DOS 3.3+) invalid password
  5824.  57h (87)  (DOS 3.3+) invalid parameter
  5825.  58h (88)  (DOS 3.3+) network write fault
  5826.  59h (89)  (DOS 4+) function not supported on network
  5827.  5Ah (90)  (DOS 4+) required system component not installed
  5828.  64h (100) (MSCDEX) unknown error
  5829.  65h (101) (MSCDEX) not ready
  5830.  66h (102) (MSCDEX) EMS memory no longer valid
  5831.  67h (103) (MSCDEX) not High Sierra or ISO-9660 format
  5832.  68h (104) (MSCDEX) door open
  5833.  
  5834. Values for Error Class:
  5835.  01h    out of resource (storage space or I/O channels)
  5836.  02h    temporary situation (file or record lock)
  5837.  03h    authorization (denied access)
  5838.  04h    internal (system software bug)
  5839.  05h    hardware failure
  5840.  06h    system failure (configuration file missing or incorrect)
  5841.  07h    application program error
  5842.  08h    not found
  5843.  09h    bad format
  5844.  0Ah    locked
  5845.  0Bh    media error
  5846.  0Ch    already exists
  5847.  0Dh    unknown
  5848.  
  5849. Values for Suggested Action:
  5850.  01h    retry
  5851.  02h    delayed retry
  5852.  03h    prompt user to reenter input
  5853.  04h    abort after cleanup
  5854.  05h    immediate abort
  5855.  06h    ignore
  5856.  07h    retry after user intervention
  5857.  
  5858. Values for Error Locus:
  5859.  01h    unknown or not appropriate
  5860.  02h    block device (disk error)
  5861.  03h    network related
  5862.  04h    serial device (timeout)
  5863.  05h    memory related
  5864. --------D-2159--BX0001-----------------------
  5865. INT 21 - European MS-DOS 4.0 - GET HARD ERROR INFORMATION
  5866.     AH = 59h
  5867.     BX = 0001h
  5868. Return: ES:DI -> hard error information packet (see below) for most recent
  5869.         hard (critical) error
  5870. SeeAlso: AH=59h/BX=0000h,AH=95h,INT 24
  5871.  
  5872. Format of hard error information packet:
  5873. Offset    Size    Description
  5874.  00h    WORD    contents of AX at system entry
  5875.  02h    WORD    Process ID which encountered error
  5876.  04h    WORD    contents of AX at time of error
  5877.  06h    BYTE    error type
  5878.         00h physical I/O error
  5879.         01h disk change request
  5880.         02h file sharing violation
  5881.         03h FCB problem
  5882.         04h file locking violation
  5883.         05h bad FAT
  5884.         06h network detected error
  5885.  07h    BYTE    INT 24 error code
  5886.  08h    WORD    extended error code (see AH=59h/BX=0000h)
  5887.  0Ah    DWORD    pointer to associated device
  5888. --------D-215A-------------------------------
  5889. INT 21 - DOS 3+ - CREATE TEMPORARY FILE
  5890.     AH = 5Ah
  5891.     CX = file attribute (see AX=4301h)
  5892.     DS:DX -> ASCIZ path ending with a '\' + 13 zero bytes to receive the
  5893.         generated filename
  5894. Return: CF clear if successful
  5895.         AX = file handle opened for read/write in compatibility mode
  5896.         DS:DX pathname extended with generated name for temporary file
  5897.     CF set on error
  5898.         AX = error code (03h,04h,05h) (see AH=59h)
  5899. Desc:    creates a file with a unique name which must be explicitly deleted
  5900. BUGS:    COMPAQ DOS 3.31 hangs if the pathname is at XXXXh:0000h; it apparently
  5901.       wraps around to the end of the segment
  5902.     MS-DOS 5.00 revisions A and B and PC-DOS 5.00 revision A reportedly
  5903.       hang the system if the specified path is the root directory and the
  5904.       root directory is full (no free directory entries)
  5905. Note:    under the FlashTek X-32 DOS extender, the path pointer is in DS:EDX
  5906. SeeAlso: AH=3Ch,AH=5Bh
  5907. --------D-215B-------------------------------
  5908. INT 21 - DOS 3+ - CREATE NEW FILE
  5909.     AH = 5Bh
  5910.     CX = file attribute (see AX=4301h)
  5911.     DS:DX -> ASCIZ filename
  5912. Return: CF clear if successful
  5913.         AX = file handle opened for read/write in compatibility mode
  5914.     CF set on error
  5915.         AX = error code (03h,04h,05h,50h) (see AH=59h)
  5916. Notes:    unlike AH=3Ch, this function will fail if the specified file exists
  5917.       rather than truncating it; this permits its use in creating semaphore
  5918.       files because it is an atomic "test and set" operation
  5919.     under the FlashTek X-32 DOS extender, the filename pointer is in DS:EDX
  5920. SeeAlso: AH=3Ch,AH=5Ah
  5921. --------D-215C-------------------------------
  5922. INT 21 - DOS 3+ - "FLOCK" - RECORD LOCKING
  5923.     AH = 5Ch
  5924.     AL = subfunction
  5925.         00h lock region of file
  5926.         01h unlock region of file
  5927.     BX = file handle
  5928.     CX:DX = start offset of region within file
  5929.     SI:DI = length of region in bytes
  5930. Return: CF clear if successful
  5931.     CF set on error
  5932.         AX = error code (01h,06h,21h,24h) (see AH=59h)
  5933. Notes:    error returned unless SHARE or network installed
  5934.     an unlock call must specify the same region as some prior lock call
  5935.     locked regions become entirely inaccessible to other processes
  5936.     duplicate handles created with AH=45h or AH=46h inherit locks, but
  5937.       handles inherited by child processes (see AH=4Bh) do not
  5938.     under DR-DOS 3.41 and 5.0, if a process opens a file without the no-
  5939.       inherit flag and then starts a child, any locks set by the parent
  5940.       are ignored, and the child will only get an error if it tries to
  5941.       lock an area previously locked by the parent process
  5942. SeeAlso: AX=440Bh,AH=BCh,AH=BEh,INT 2F/AX=110Ah,INT 2F/AX=110Bh
  5943. --------D-215D00-----------------------------
  5944. INT 21 U - DOS 3.1+ internal - SERVER FUNCTION CALL
  5945.     AX = 5D00h
  5946.     DS:DX -> DOS parameter list (see below)
  5947.     DPL contains all register values for a call to INT 21h
  5948. Return: as appropriate for function being called
  5949. Notes:    does not check AH.  Out of range values will crash the system
  5950.     executes using specified computer ID and process ID
  5951.     sharing delay loops skipped
  5952.     a special sharing mode is enabled to handle FCBs opened across network
  5953.     wildcards are enabled for DELETE (AH=41h) and RENAME (AH=56h) under
  5954.       MS-DOS; under DR-DOS 3.41, wildcards corrupt the filesystem; and
  5955.       under DR-DOS 5.0-6.0, the call returns error code 03h due to improper
  5956.       support for the server function call (see below)
  5957.     an extra file attribute parameter is enabled for OPEN (AH=3Dh),
  5958.       DELETE (AH=41h), and RENAME (AH=56h)
  5959.     functions which take filenames require canonical names (as returned
  5960.       by AH=60h); this is apparently to prevent multi-hop file forwarding
  5961. BUGS:    the OS/2 2.0 DOS Boot Session incorrectly maps DOS drive letters,
  5962.       seemingly ignoring HPFS drives
  5963.     DR-DOS 5.0-6.0 merely recursively call INT 21 after loading the
  5964.       registers from the DPL, leading to problems for peer-to-peer
  5965.       networks
  5966. SeeAlso: AH=3Dh,AH=41h,AH=56h,AH=60h
  5967.  
  5968. Format of DOS parameter list:
  5969. Offset    Size    Description
  5970.  00h    WORD    AX
  5971.  02h    WORD    BX
  5972.  04h    WORD    CX
  5973.  06h    WORD    DX
  5974.  08h    WORD    SI
  5975.  0Ah    WORD    DI
  5976.  0Ch    WORD    DS
  5977.  0Eh    WORD    ES
  5978.  10h    WORD    reserved (0)
  5979.  12h    WORD    computer ID (0 = current system)
  5980.  14h    WORD    process ID (PSP segment on specified computer)
  5981. Note:    under Windows Enhanced mode, the computer ID is normally the virtual
  5982.       machine ID (see INT 2F/AX=1683h), though this can reportedly be
  5983.       changed by setting UniqueDOSPSP= in SYSTEM.INI
  5984. --------D-215D01-----------------------------
  5985. INT 21 U - DOS 3.1+ internal - COMMIT ALL FILES FOR SPECIFIED COMPUTER/PROCESS
  5986.     AX = 5D01h
  5987.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID and
  5988.         process ID fields used
  5989. Return: CF set on error
  5990.         AX = error code (see AH=59h)
  5991.     CF clear if successful
  5992. Notes:    flushes buffers and updates directory entries for each file which has
  5993.       been written to; if remote file, calls INT 2F/AX=1107h
  5994.     the computer ID and process ID are stored but ignored under DOS 3.3
  5995.     not supported by DR-DOS 3.41 and 5.0; returns error code 01h
  5996. SeeAlso: AH=0Dh,AH=68h,INT 2F/AX=1107h
  5997. --------D-215D02-----------------------------
  5998. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE FILE BY NAME
  5999.     AX = 5D02h
  6000.     DS:DX -> DOS parameter list (see AX=5D00h), only fields DX, DS,
  6001.         computer ID, and process ID used
  6002.     DPL's DS:DX -> ASCIZ name of file to close
  6003. Return: CF set on error
  6004.         AX = error code (see AH=59h)
  6005.     CF clear if successful
  6006. Notes:    error unless SHARE is loaded (calls [SysFileTable-28h]) (see AH=52h)
  6007.     name must be canonical fully-qualified, such as returned by AH=60h
  6008.     not supported by DR-DOS 3.41 and 5.0; returns error code 01h
  6009. SeeAlso: AX=5D03h,AX=5D04h,AH=3Eh,AH=60h
  6010. --------D-215D03-----------------------------
  6011. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN COMPUTER
  6012.     AX = 5D03h
  6013.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID used
  6014. Return: CF set on error
  6015.         AX = error code (see AH=59h)
  6016.     CF clear if successful
  6017. Notes:    error unless SHARE is loaded (calls [SysFileTable-30h]) (see AH=52h)
  6018.     not supported by DR-DOS 3.41 and 5.0; returns error code 01h
  6019. SeeAlso: AX=5D02h,AX=5D04h
  6020. --------D-215D04-----------------------------
  6021. INT 21 U - DOS 3.1+ internal - SHARE.EXE - CLOSE ALL FILES FOR GIVEN PROCESS
  6022.     AX = 5D04h
  6023.     DS:DX -> DOS parameter list (see AX=5D00h), only computer ID and
  6024.         process ID fields used
  6025. Return: CF set on error
  6026.         AX = error code (see AH=59h)
  6027.     CF clear if successful
  6028. Notes:    error unless SHARE is loaded (calls [SysFileTable-2Ch]) (see AH=52h)
  6029.     not supported by DR-DOS 3.41 and 5.0; returns error code 01h
  6030. SeeAlso: AX=5D02h,AX=5D03h,INT 2F/AX=111Dh
  6031. --------D-215D05-----------------------------
  6032. INT 21 U - DOS 3.1+ internal - SHARE.EXE - GET OPEN FILE LIST ENTRY
  6033.     AX = 5D05h
  6034.     DS:DX -> DOS parameter list (see AX=5D00h)
  6035.     DPL's BX = index of sharing record (see AH=52h)
  6036.     DPL's CX = index of SFT in sharing record's SFT list
  6037. Return: CF clear if successful
  6038.         ES:DI -> ASCIZ filename
  6039.         BX = network machine number of SFT's owner
  6040.         CX = number of locks held by SFT's owner
  6041.     CF set if either index out of range
  6042.         AX = 0012h (no more files)
  6043. Notes:    error unless SHARE is loaded (calls [SysFileTable-18h]) (see AH=52h)
  6044.     names are always canonical fully-qualified, such as returned by AH=60h
  6045.     not supported by DR-DOS 3.41 and 5.0, but does not return an error
  6046. SeeAlso: AH=5Ch,AH=60h
  6047. --------D-215D06-----------------------------
  6048. INT 21 U - DOS 3.0+ internal - GET ADDRESS OF DOS SWAPPABLE DATA AREA
  6049.     AX = 5D06h
  6050. Return: CF set on error
  6051.        AX = error code (see AH=59h)
  6052.     CF clear if successful
  6053.         DS:SI -> nonreentrant data area (includes all three DOS stacks)
  6054.         (critical error flag is first byte)
  6055.         CX = size in bytes of area which must be swapped while in DOS
  6056.         DX = size in bytes of area which must always be swapped
  6057. Notes:    the Critical Error flag is used in conjunction with the InDOS flag
  6058.       (see AH=34h) to determine when it is safe to enter DOS from a TSR
  6059.     setting CritErr flag allows use of functions 50h/51h from INT 28h under
  6060.       DOS 2.x by forcing use of correct stack
  6061.     swapping the data area allows reentering DOS unless DOS is in a
  6062.       critical section delimited by INT 2A/AH=80h and INT 2A/AH=81h,82h
  6063.     under DOS 4.0, AX=5D0Bh should be used instead of this function
  6064.     SHARE and other DOS utilities consult the byte at offset 04h in the
  6065.       DOS data segment (see INT 2F/AX=1203h) to determine the SDA format
  6066.       in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
  6067.     DR-DOS 3.41+ supports this function, but the SDA format beyond the
  6068.       first 18h bytes is completely different from MS-DOS
  6069. SeeAlso: AX=5D0Bh,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h
  6070.  
  6071. Format of DOS 3.10-3.30 Swappable Data Area:
  6072. Offset    Size    Description
  6073.  -31    BYTE    (DOS 3.30) current switch character
  6074.  -28    BYTE    (DOS 3.30) incremented on each INT 21/AX=5E01h call
  6075.  -27 16 BYTEs    (DOS 3.30) machine name set by INT 21/AX=5E01h
  6076.  -11  5 WORDs    zero-terminated list of offsets which need to be patched to
  6077.         enabled critical-section calls (see INT 2A/AH=80h)
  6078.  -1    BYTE    unused padding
  6079. ---start of actual SDA---
  6080.  00h    BYTE    critical error flag ("ErrorMode")
  6081.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  6082.  02h    BYTE    drive on which current critical error occurred, or FFh
  6083.         (DR-DOS sets to drive number during INT 24, 00h otherwise)
  6084.  03h    BYTE    locus of last error
  6085.  04h    WORD    extended error code of last error
  6086.  06h    BYTE    suggested action for last error
  6087.  07h    BYTE    class of last error
  6088.  08h    DWORD    ES:DI pointer for last error
  6089.  0Ch    DWORD    current DTA
  6090.  10h    WORD    current PSP
  6091.  12h    WORD    stores SP across an INT 23
  6092.  14h    WORD    return code from last process termination (zerod after reading
  6093.         with AH=4Dh)
  6094.  16h    BYTE    current drive
  6095.  17h    BYTE    extended break flag
  6096. ---remainder need only be swapped if in DOS---
  6097.  18h    WORD    value of AX on call to INT 21
  6098.  1Ah    WORD    PSP segment for sharing/network
  6099.  1Ch    WORD    network machine number for sharing/network (0000h = us)
  6100.  1Eh    WORD    first usable memory block found when allocating memory
  6101.  20h    WORD    best usable memory block found when allocating memory
  6102.  22h    WORD    last usable memory block found when allocating memory
  6103.  24h    WORD    memory size in paragraphs (used only during initialization)
  6104.  26h    WORD    last entry checked during directory search
  6105.  28h    BYTE    flag: INT 24 returned Fail
  6106.  29h    BYTE    flags: allowable INT 24 actions (passed to INT 24 in AH)
  6107.  2Ah    BYTE    directory flag (00h directory, 01h file)
  6108.  2Bh    BYTE    flag: FFh if Ctrl-Break termination, 00h otherwise
  6109.  2Ch    BYTE    flag: allow embedded blanks in FCB
  6110.  2Dh    BYTE    padding (unused)
  6111.  2Eh    BYTE    day of month
  6112.  2Fh    BYTE    month
  6113.  30h    WORD    year - 1980
  6114.  32h    WORD    number of days since 1-1-1980
  6115.  34h    BYTE    day of week (0 = Sunday)
  6116.  35h    BYTE    flag: console swapped during read from device
  6117.  36h    BYTE    flag: safe to call INT 28 if nonzero
  6118.  37h    BYTE    flag: if nonzero, INT 24 Abort turned into INT 24 Fail
  6119.         (set only during process termination)
  6120.  38h 26 BYTEs    device driver request header (see INT 2F/AX=0802h)
  6121.  52h    DWORD    pointer to device driver entry point (used in calling driver)
  6122.  56h 22 BYTEs    device driver request header for I/O calls
  6123.  6Ch 14 BYTEs    device driver request header for disk status check
  6124.  7Ah    DWORD    pointer to device I/O buffer???
  6125.  7Eh    WORD    ???
  6126.  80h    WORD    ???
  6127.  82h    BYTE    type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
  6128.  83h    BYTE    padding (unused)
  6129.  84h  3 BYTEs    24-bit user number (see AH=30h)
  6130.  87h    BYTE    OEM number (see AH=30h)
  6131.  88h    WORD    offset to error code conversion table for INT 25/INT 26
  6132.  8Ah  6 BYTEs    CLOCK$ transfer record (see AH=52h)
  6133.  90h    BYTE    device I/O buffer for single-byte I/O functions
  6134.  91h    BYTE    padding??? (unused)
  6135.  92h 128 BYTEs    buffer for filename
  6136. 112h 128 BYTEs    buffer for filename
  6137. 192h 21 BYTEs    findfirst/findnext search data block (see AH=4Eh)
  6138. 1A7h 32 BYTEs    directory entry for found file (see AH=11h)
  6139. 1C7h 81 BYTEs    copy of current directory structure for drive being accessed
  6140. 218h 11 BYTEs    FCB-format filename for device name comparison
  6141. 223h    BYTE    terminating NUL for above filename
  6142. 224h 11 BYTEs    wildcard destination specification for rename (FCB format)
  6143. 22Fh    BYTE    terminating NUL for above spec
  6144. 230h    BYTE    ???
  6145. 231h    WORD    destination file/directory starting sector
  6146. 233h  5 BYTEs    ???
  6147. 238h    BYTE    extended FCB file attribute
  6148. 239h    BYTE    type of FCB (00h regular, FFh extended)
  6149. 23Ah    BYTE    directory search attributes
  6150. 23Bh    BYTE    file open/access mode
  6151. 23Ch    BYTE    file found/delete flag
  6152.         bit 0: file found
  6153.         bit 4: file deleted
  6154. 23Dh    BYTE    flag: device name found on rename, or file not found
  6155. 23Eh    BYTE    splice flag (file name and directory name together)
  6156. 23Fh    BYTE    flag indicating how DOS function was invoked
  6157.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  6158. 240h    BYTE    sector position within cluster
  6159. 241h    BYTE    flag: translate sector/cluster (00h no, 01h yes)
  6160. 242h    BYTE    flag: 00h if read, 01h if write
  6161. 243h    BYTE    current working drive number
  6162. 244h    BYTE    cluster factor
  6163. 245h    BYTE    flag: cluster split mode
  6164. 246h    BYTE    line edit (AH=0Ah) insert mode flag (nonzero = on)
  6165. 247h    BYTE    canonicalized filename referred to existing file/dir if FFh
  6166. 248h    BYTE    volume ID flag
  6167. 249h    BYTE    type of process termination (00h-03h) (see AH=4Dh)
  6168. 24Ah    BYTE    file create flag (00h = no)
  6169. 24Bh    BYTE    value with which to replace first byte of deleted file's name
  6170.         (normally E5h, but 00h as described under INT 21/AH=13h)
  6171. 24Ch    DWORD    pointer to Drive Parameter Block for critical error invocation
  6172.         temp: used during process termination
  6173. 250h    DWORD    pointer to stack frame containing user registers on INT 21
  6174. 254h    WORD    stores SP across INT 24
  6175. 256h    DWORD    pointer to DOS Drive Parameter Block for ???
  6176. 25Ah    WORD    saving partial cluster number
  6177. 25Ch    WORD    temp: sector of work current cluster
  6178. 25Eh    WORD    high part of cluster number (only low byte referenced)
  6179. 260h    WORD    ??? temp
  6180. 262h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  6181. 263h    BYTE    padding (unused)
  6182. 264h    DWORD    pointer to device header
  6183. 268h    DWORD    pointer to current SFT
  6184. 26Ch    DWORD    pointer to current directory structure for drive being accessed
  6185. 270h    DWORD    pointer to caller's FCB
  6186. 274h    WORD    number of SFT to which file being opened will refer
  6187. 276h    WORD    temporary storage for file handle
  6188. 278h    DWORD    pointer to a JFT entry in process handle table (see AH=26h)
  6189. 27Ch    WORD    offset in DOS DS of first filename argument
  6190. 27Eh    WORD    offset in DOS DS of second filename argument
  6191. 280h    WORD    offset of last component in pathname or FFFFh
  6192. 282h    WORD    offset of transfer address to add
  6193. 284h    WORD    last relative cluster within file being accessed
  6194. 286h    WORD    temp: absolute cluster number being accessed
  6195. 288h    WORD    directory sector number
  6196. 28Ah    WORD    ??? current cluster number
  6197. 28Ch    WORD    ??? current offset in file DIV bytes per sector
  6198. 28Eh    WORD    current sector number
  6199. 290h    WORD    current byte offset within sector
  6200. 292h    DWORD    current offset in file
  6201. 296h    DWORD    temp: file byte count
  6202. 29Ah    WORD    temp: file byte count
  6203. 29Ch    WORD    free file cluster entry
  6204. 29Eh    WORD    last file cluster entry
  6205. 2A0h    WORD    next file cluster number
  6206. 2A2h    DWORD    number of bytes appended to file
  6207. 2A6h    DWORD    pointer to current work disk buffer
  6208. 2AAh    DWORD    pointer to working SFT
  6209. 2AEh    WORD    used by INT 21 dispatcher to store caller's BX
  6210. 2B0h    WORD    used by INT 21 dispatcher to store caller's DS
  6211. 2B2h    WORD    temporary storage while saving/restoring caller's registers
  6212. 2B4h    DWORD    pointer to prev call frame (offset 250h) if INT 21 reentered
  6213.         also switched to for duration of INT 24
  6214. 2B8h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  6215.         (see AH=4Eh)
  6216. 2CDh 32 BYTEs    directory entry for file being renamed (see AH=11h for format)
  6217. 2EDh 331 BYTEs    critical error stack
  6218.    403h     35 BYTEs scratch SFT
  6219. 438h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25,INT 26)
  6220. 5B8h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  6221. ---DOS 3.2,3.3x only---
  6222. 738h    BYTE    device driver lookahead flag (usually printer) (see AH=64h)
  6223. 739h    BYTE    volume change flag
  6224. 73Ah    BYTE    flag: virtual open
  6225. 73Bh    BYTE    ???
  6226. --------D-215D07-----------------------------
  6227. INT 21 U - DOS 3.1+ network - GET REDIRECTED PRINTER MODE
  6228.     AX = 5D07h
  6229. Return: DL = mode
  6230.         00h redirected output is combined
  6231.         01h redirected output in separate print jobs
  6232. SeeAlso: AX=5D08h,AX=5D09h,INT 2F/AX=1125h
  6233. --------D-215D08-----------------------------
  6234. INT 21 U - DOS 3.1+ network - SET REDIRECTED PRINTER MODE
  6235.     AX = 5D08h
  6236.     DL = mode
  6237.         00h redirected output is combined
  6238.         01h redirected output placed in separate jobs, start new print job
  6239.         now
  6240. SeeAlso: AX=5D07h,AX=5D09h,INT 2F/AX=1125h
  6241. --------D-215D09-----------------------------
  6242. INT 21 U - DOS 3.1+ network - FLUSH REDIRECTED PRINTER OUTPUT
  6243.     AX = 5D09h
  6244. Notes:    forces redirected printer output to be printed, and starts a new print
  6245.       job
  6246.     this function is also supported by 10Net, which calls it Terminate All
  6247.       Spool Jobs, and does not flush if in "combine" mode
  6248. SeeAlso: AX=5D07h,AX=5D08h,INT 2F/AX=1125h
  6249. --------D-215D0A-----------------------------
  6250. INT 21 - DOS 3.1+ - SET EXTENDED ERROR INFORMATION
  6251.     AX = 5D0Ah
  6252.     DS:DX -> 11-word DOS parameter list (see AX=5D00h)
  6253. Return: nothing.  next call to AH=59h will return values from fields AX,BX,CX,
  6254.       DX,DI, and ES in corresponding registers
  6255. Notes:    documented for DOS 5+, but undocumented in earlier versions
  6256.     the MS-DOS Programmer's Reference incorrectly states that this call was
  6257.       introduced in DOS 4, and fails to mention that the ERROR structure
  6258.       passed to this function is a DOS parameter list.
  6259. BUG:    DR-DOS 3.41 and 5.0 read the value for ES from the DS field of the DPL;
  6260.       fortunately, MS-DOS ignores the DS field, allowing a generic routine
  6261.       which sets both DS and ES fields to the same value
  6262. SeeAlso: AH=59h
  6263. --------D-215D0B-----------------------------
  6264. INT 21 U - DOS 4.x only internal - GET DOS SWAPPABLE DATA AREAS
  6265.     AX = 5D0Bh
  6266. Return: CF set on error
  6267.         AX = error code (see AH=59h)
  6268.     CF clear if successful
  6269.         DS:SI -> swappable data area list (see below)
  6270. Notes:    copying and restoring the swappable data areas allows DOS to be
  6271.       reentered unless it is in a critical section delimited by calls to
  6272.       INT 2A/AH=80h and INT 2A/AH=81h,82h
  6273.     SHARE and other DOS utilities consult the byte at offset 04h in the
  6274.       DOS data segment (see INT 2F/AX=1203h) to determine the SDA format
  6275.       in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
  6276.     DOS 5+ use the SDA format listed below, but revert back to the DOS 3.x
  6277.       call for finding the SDA (see AX=5D06h)
  6278. SeeAlso: AX=5D06h,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h,INT 2F/AX=1203h
  6279.  
  6280. Format of DOS 4.x swappable data area list:
  6281. Offset    Size    Description
  6282.  00h    WORD    count of data areas
  6283.  02h  N BYTEs    "count" copies of data area record
  6284.         Offset    Size    Description
  6285.          00h    DWORD    address
  6286.          04h    WORD    length and type
  6287.                 bit 15 set if swap always, clear if swap in DOS
  6288.                 bits 14-0: length in bytes
  6289.  
  6290. Format of DOS 4.0-6.0 swappable data area:
  6291. Offset    Size    Description
  6292.  -31    BYTE    current switch character (ignored by DOS 5+)
  6293.  -28    BYTE    incremented on each INT 21/AX=5E01h call
  6294.  -27 16 BYTEs    machine name set by INT 21/AX=5E01h
  6295.  -11  5 WORDs    zero-terminated list of offsets which need to be patched to
  6296.         enabled critical-section calls (see INT 2A/AH=80h)
  6297.         (all offsets are 0D0Ch, but this list is still present for
  6298.         DOS 3.x compatibility)
  6299.  -1    BYTE    unused padding
  6300. ---start of actual SDA---
  6301.  00h    BYTE    critical error flag ("ErrorMode")
  6302.  01h    BYTE    InDOS flag (count of active INT 21 calls)
  6303.  02h    BYTE    drive on which current critical error occurred or FFh
  6304.  03h    BYTE    locus of last error
  6305.  04h    WORD    extended error code of last error
  6306.  06h    BYTE    suggested action for last error
  6307.  07h    BYTE    class of last error
  6308.  08h    DWORD    ES:DI pointer for last error
  6309.  0Ch    DWORD    current DTA
  6310.  10h    WORD    current PSP
  6311.  12h    WORD    stores SP across an INT 23
  6312.  14h    WORD    return code from last process termination (zerod after reading
  6313.         with AH=4Dh)
  6314.  16h    BYTE    current drive
  6315.  17h    BYTE    extended break flag
  6316.  18h    BYTE    flag: code page switching
  6317.  19h    BYTE    flag: copy of previous byte in case of INT 24 Abort
  6318. ---remainder need only be swapped if in DOS---
  6319.  1Ah    WORD    value of AX on call to INT 21
  6320.  1Ch    WORD    PSP segment for sharing/network
  6321.  1Eh    WORD    network machine number for sharing/network (0000h = us)
  6322.  20h    WORD    first usable memory block found when allocating memory
  6323.  22h    WORD    best usable memory block found when allocating memory
  6324.  24h    WORD    last usable memory block found when allocating memory
  6325.  26h    WORD    memory size in paragraphs (used only during initialization)
  6326.  28h    WORD    last entry checked during directory search
  6327.  2Ah    BYTE    flag: nonzero if INT 24 Fail
  6328.  2Bh    BYTE    flags: allowable INT 24 responses (passed to INT 24 in AH)
  6329.  2Ch    BYTE    flag: do not set directory if nonzero
  6330.  2Dh    BYTE    flag: program aborted by ^C
  6331.  2Eh    BYTE    flag: allow embedded blanks in FCB
  6332.  2Fh    BYTE    padding (unused)
  6333.  30h    BYTE    day of month
  6334.  31h    BYTE    month
  6335.  32h    WORD    year - 1980
  6336.  34h    WORD    number of days since 1-1-1980
  6337.  36h    BYTE    day of week (0 = Sunday)
  6338.  37h    BYTE    flag: console swapped during read from device
  6339.  38h    BYTE    flag: safe to call INT 28 if nonzero
  6340.  39h    BYTE    flag: abort currently in progress, turn INT 24 Abort into Fail
  6341.  3Ah 30 BYTEs    device driver request header (see INT 2F/AX=0802h) for
  6342.         device calls
  6343.  58h    DWORD    pointer to device driver entry point (used in calling driver)
  6344.  5Ch 22 BYTEs    device driver request header for I/O calls
  6345.  72h 14 BYTEs    device driver request header for disk status check
  6346.  80h    DWORD    pointer to device I/O buffer
  6347.  84h    WORD    ???
  6348.  86h    WORD    ??? (0)
  6349.  88h    BYTE    type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
  6350.  89h    DWORD    start offset of file region to lock/unlock
  6351.  8Dh    DWORD    length of file region to lock/unlock
  6352.  91h    BYTE    padding (unused)
  6353.  92h  3 BYTEs    24-bit user number (see AH=30h)
  6354.  95h    BYTE    OEM number (see AH=30h)
  6355.  96h  6 BYTEs    CLOCK$ transfer record (see AH=52h)
  6356.  9Ch    BYTE    device I/O buffer for single-byte I/O functions???
  6357.  9Dh    BYTE    padding???
  6358.  9Eh 128 BYTEs    buffer for filename
  6359. 11Eh 128 BYTEs    buffer for filename
  6360. 19Eh 21 BYTEs    findfirst/findnext search data block (see AH=4Eh)
  6361. 1B3h 32 BYTEs    directory entry for found file (see AH=11h)
  6362. 1D3h 88 BYTEs    copy of current directory structure for drive being accessed
  6363. 22Bh 11 BYTEs    FCB-format filename for device name comparison
  6364. 236h    BYTE    terminating NUL for above filename
  6365. 237h 11 BYTEs    wildcard destination specification for rename (FCB format)
  6366. 242h    BYTE    terminating NUL for above spec
  6367. 243h    BYTE    ???
  6368. 244h    WORD    ???
  6369. 246h  5 BYTEs    ???
  6370. 24Bh    BYTE    extended FCB file attributes
  6371. 24Ch    BYTE    type of FCB (00h regular, FFh extended)
  6372. 24Dh    BYTE    directory search attributes
  6373. 24Eh    BYTE    file open/access mode
  6374. 24Fh    BYTE    ??? flag bits
  6375. 250h    BYTE    flag: device name found on rename, or file not found
  6376. 251h    BYTE    splice flag??? (file name and directory name together)
  6377. 252h    BYTE    flag indicating how DOS function was invoked
  6378.         (00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
  6379. 253h    BYTE    ???
  6380. 254h    BYTE    ???
  6381. 255h    BYTE    ???
  6382. 256h    BYTE    ???
  6383. 257h    BYTE    ???
  6384. 258h    BYTE    ???
  6385. 259h    BYTE    ???
  6386. 25Ah    BYTE    canonicalized filename referred to existing file/dir if FFh
  6387. 25Bh    BYTE    ???
  6388. 25Ch    BYTE    type of process termination (00h-03h)
  6389. 25Dh    BYTE    ???
  6390. 25Eh    BYTE    ???
  6391. 25Fh    BYTE    ???
  6392. 260h    DWORD    pointer to Drive Parameter Block for critical error invocation
  6393. 264h    DWORD    pointer to stack frame containing user registers on INT 21
  6394. 268h    WORD    stores SP???
  6395. 26Ah    DWORD    pointer to DOS Drive Parameter Block for ???
  6396. 26Eh    WORD    segment of disk buffer
  6397. 270h    WORD    ???
  6398. 272h    WORD    ???
  6399. 274h    WORD    ???
  6400. 276h    WORD    ???
  6401. 278h    BYTE    Media ID byte returned by AH=1Bh,1Ch
  6402. 279h    BYTE    ??? (doesn't seem to be referenced)
  6403. 27Ah    DWORD    pointer to ???
  6404. 27Eh    DWORD    pointer to current SFT
  6405. 282h    DWORD    pointer to current directory structure for drive being accessed
  6406. 286h    DWORD    pointer to caller's FCB
  6407. 28Ah    WORD    SFT index to which file being opened will refer
  6408. 28Ch    WORD    temporary storage for file handle
  6409. 28Eh    DWORD    pointer to a JFT entry in process handle table (see AH=26h)
  6410. 292h    WORD    offset in DOS DS of first filename argument
  6411. 294h    WORD    offset in DOS DS of second filename argument
  6412. 296h    WORD    ???
  6413. 298h    WORD    ???
  6414. 29Ah    WORD    ???
  6415. 29Ch    WORD    ???
  6416. 29Eh    WORD    ???
  6417. 2A0h    WORD    ???
  6418. 2A2h    WORD    ??? directory cluster number???
  6419. 2A4h    DWORD    ???
  6420. 2A8h    DWORD    ???
  6421. 2ACh    WORD    ???
  6422. 2AEh    DWORD    offset in file???
  6423. 2B2h    WORD    ???
  6424. 2B4h    WORD    bytes in partial sector
  6425. 2B6h    WORD    number of sectors
  6426. 2B8h    WORD    ???
  6427. 2BAh    WORD    ???
  6428. 2BCh    WORD    ???
  6429. 2BEh    DWORD    number of bytes appended to file
  6430. 2C2h    DWORD    pointer to ??? disk buffer
  6431. 2C6h    DWORD    pointer to ??? SFT
  6432. 2CAh    WORD    used by INT 21 dispatcher to store caller's BX
  6433. 2CCh    WORD    used by INT 21 dispatcher to store caller's DS
  6434. 2CEh    WORD    temporary storage while saving/restoring caller's registers
  6435. 2D0h    DWORD    pointer to prev call frame (offset 264h) if INT 21 reentered
  6436.         also switched to for duration of INT 24
  6437. 2D4h    WORD    open mode/action for INT 21/AX=6C00h
  6438. 2D6h    BYTE    ??? (set to 00h by INT 21h dispatcher, 02h when a read is
  6439.         performed, and 01h or 03h by INT 21/AX=6C00h)
  6440. 2D7h    WORD    ??? apparently unused
  6441. 2D9h    DWORD    stored ES:DI for AX=6C00h
  6442. 2DDh    WORD    extended file open action code (see AX=6C00h)
  6443. 2DFh    WORD    extended file open attributes (see AX=6C00h)
  6444. 2E1h    WORD    extended file open file mode (see AX=6C00h)
  6445. 2E3h    DWORD    pointer to filename to open (see AX=6C00h)
  6446. 2E7h    WORD    ???
  6447. 2E9h    WORD    ???
  6448. 2EBh    BYTE    ???
  6449. 2ECh    WORD    stores DS during call to [List-of-Lists + 37h]
  6450. 2EEh    WORD    ???
  6451. 2F0h    BYTE    ???
  6452. 2F1h    WORD    ??? bit flags
  6453. 2F3h    DWORD    pointer to user-supplied filename
  6454. 2F7h    DWORD    pointer to ???
  6455. 2FBh    WORD    stores SS during call to [List-of-Lists + 37h]
  6456. 2FDh    WORD    stores SP during call to [List-of-Lists + 37h]
  6457. 2FFh    BYTE    flag, nonzero if stack switched in calling [List-of-Lists+37h]
  6458. 300h 21 BYTEs    FindFirst search data for source file(s) of a rename operation
  6459.         (see AH=4Eh)
  6460. 315h 32 BYTEs    directory entry for file being renamed (see AH=11h)
  6461. 335h 331 BYTEs    critical error stack
  6462. 480h 384 BYTEs    disk stack (functions greater than 0Ch, INT 25,INT 26)
  6463. 600h 384 BYTEs    character I/O stack (functions 01h through 0Ch)
  6464. 780h    BYTE    device driver lookahead flag (usually printer) (see AH=64h)
  6465. 781h    BYTE    volume change flag
  6466. 782h    BYTE    flag: virtual open
  6467. 783h    BYTE    ???
  6468. 784h    WORD    ???
  6469. 786h    WORD    ???
  6470. 788h    WORD    ???
  6471. 78Ah    WORD    ???
  6472. --------D-215E00-----------------------------
  6473. INT 21 - DOS 3.1+ network - GET MACHINE NAME
  6474.     AX = 5E00h
  6475.     DS:DX -> 16-byte buffer for ASCIZ machine name
  6476. Return: CF clear if successful
  6477.         CH = validity
  6478.         00h name invalid
  6479.         nonzero valid
  6480.             CL = NetBIOS number for machine name
  6481.             DS:DX buffer filled with blank-paded name
  6482.     CF set on error
  6483.         AX = error code (01h) (see AH=59h)
  6484. Note:    supported by OS/2 v1.3+ compatibility box, PC-NFS
  6485. SeeAlso: AX=5E01h
  6486. --------N-215E00-----------------------------
  6487. INT 21 - 10NET v5.0 - GET MACHINE NAME
  6488.     AX = 5E00h
  6489. Return: CL = redirector's NetBIOS name number
  6490.     ES:DI -> network node ID
  6491. SeeAlso: AX=5E01h"10NET"
  6492. --------D-215E01CH00-------------------------
  6493. INT 21 - DOS 3.1+ network - SET MACHINE NAME
  6494.     AX = 5E01h
  6495.     CH = 00h undefine name (make it invalid)
  6496.        <> 0     define name
  6497.     CL = name number
  6498.     DS:DX -> 15-character blank-padded ASCIZ name
  6499. SeeAlso: AX=5E00h
  6500. --------N-215E01-----------------------------
  6501. INT 21 - 10NET v5.0 - GET LOCAL 10NET CONFIGURATION TABLE
  6502.     AX = 5E01h
  6503.     CX = length of buffer
  6504.     DS:DX -> buffer for 10Net configuration table
  6505. SeeAlso: AX=5E00h"10NET",INT 6F/AH=02h,INT 6F/AH=03h
  6506.  
  6507. Format of 10Net Configuration Table:
  6508. Offset    Size    Description
  6509.  00h  8 BYTEs    user name
  6510.  08h 15 BYTEs    node ID
  6511.  17h  3 BYTEs    unique portion of Ethernet address
  6512.  1Ah    BYTE    Who group number
  6513.  1Bh    WORD    services mask (see below)
  6514.  1Dh    DWORD    serial number
  6515.  21h    BYTE    maximum concurrent users with same serial number allowed on net
  6516.  22h    BYTE    chat mask (see below)
  6517.  23h    BYTE    internal system bits (see below)
  6518.  24h  9 BYTEs    version number in format MM.mm.xxx
  6519.  2Dh    BYTE    flag: 01h if machine is a PS/2
  6520.  2Eh    BYTE    flag: 03h if 80386
  6521.  2Fh    BYTE    spool termination mode: 01h concatenate, 02h truncate
  6522.         (see AX=5D09h)
  6523.  30h    WORD    autospool timeout in clock ticks
  6524.  32h    WORD    monitor timeout in clock ticks
  6525.  34h    WORD    unused
  6526.  36h    WORD    chat timeout in clock ticks
  6527.  38h    WORD    netBIOS session timeout in half-seconds
  6528.  3Ah    WORD    datagram send timeout in seconds
  6529.  3Ch    WORD    keyboard value for initiating chat mode
  6530.  3Eh    WORD    Who timeout in clock ticks
  6531.  40h    BYTE    flag: 01h if server should process rom NetBIOS Post return
  6532.  41h    BYTE    flag: 01h if FCBs should be recycled
  6533.  42h  3 BYTEs    signature "DBG"
  6534.  45h    BYTE    last interrupt (21h or 6Fh)
  6535.  46h    BYTE    last INT 21 AH value
  6536.  47h    BYTE    last INT 6F AH value
  6537.  48h    WORD    last item posted
  6538.  4Ah    WORD    last item free-posted
  6539.  4Ch    WORD    last item handled by server
  6540.  4Eh    WORD    last redirector send NCB
  6541.  50h    WORD    last redirector receive NCB
  6542.  52h  4 BYTEs    signature "TABL"
  6543.  56h    WORD    offset of datagram buffer table header
  6544.  58h    WORD    offset of chat buffer table header
  6545.  5Ah    WORD    offset of Raw buffer table header
  6546.  5Ch    WORD    offset of Workstation buffer table header
  6547.  5Eh    WORD    offset of server receive-any table header
  6548.  60h    WORD    offset of Tiny buffer table header
  6549.  62h    WORD    offset of zero-length buffer table (NCBs)
  6550.  64h    WORD    offset of Rdr (Redirector Mount) table header
  6551.  66h    WORD    offset of Ntab (Redirector Session) table header
  6552.  68h    WORD    offset of FCB table header
  6553.  6Ah    WORD    offset of user file handle table header
  6554.  6Ch    WORD    offset of workstation printer RDR extension table header
  6555.  6Eh    WORD    offset of server shared device table header
  6556.  70h    WORD    offset of server connection table header
  6557.  72h    WORD    offset of server login table header
  6558.  74h    WORD    offset of server file table header
  6559.  76h    WORD    offset of server shared file table header
  6560.  78h    WORD    offset of server record lock table header
  6561.  7Ah    WORD    offset of remote printer claim table header
  6562.  7Ch    WORD    offset of remote printer device table header
  6563.  7Eh    WORD    offset of print server mount table header
  6564.  80h    WORD    offset of print server sessions table header
  6565.  82h    WORD    offset of print server print job structure table header
  6566.  84h    WORD    offset of print server pooled device table header
  6567.  86h    WORD    size of workstation buffer
  6568.  88h    WORD    size of server receive-any buffer
  6569.  8Ah    WORD    size of server raw I/O buffer
  6570.  8Ch  6 BYTEs    reserved
  6571.  92h    DWORD    pointer to profile pathname
  6572.  96h    BYTE    datagram retry count
  6573.  97h    BYTE    NetBIOS LAN adapter number
  6574.  98h  6 BYTEs    physical Ethernet address
  6575.  9Eh    BYTE    NetBIOS server name number
  6576.  9Fh    BYTE    NetBIOS redirector name number
  6577.  A0h    BYTE    10Net interrupt number
  6578.  A1h    BYTE    flag: chat is loaded
  6579.  A2h    BYTE    flag: INT 6F APIs permanently loaded
  6580.  A3h    BYTE    flag: file security present
  6581.  A4h    WORD    reserved
  6582.  A6h    BYTE    fixed mount bitmask for drives A:-H:
  6583.  A7h    BYTE    reserved
  6584.  A8h    WORD    10Net system flags (see below)
  6585.  AAh    BYTE    monitor flags (see below)
  6586.  ABh  5 BYTEs    reserved
  6587.  B0h    WORD    offset of monitor timer block
  6588.  B2h    WORD    offset of server timer block
  6589.  B4h    WORD    offset of chat timer block
  6590.  B6h    WORD    timer chain
  6591.  B8h  4 BYTEs    signature "TALS"
  6592.  BCh    WORD    number of 10Net sends
  6593.  BEh    WORD    number of 10Net receives
  6594.  C0h    WORD    number of no-buffer conditions
  6595.  C2h    WORD    number of dropped posted messages
  6596.  C4h    WORD    number of server NCB errors
  6597.  C6h    WORD    number of redirector NCB errors
  6598.  C8h    WORD    number of datagram send/receive errors
  6599.  CAh    WORD    number of dropped Whos
  6600.  CCh    WORD    number of dropped submits
  6601.  CEh    WORD    number of session aborts
  6602.  D0h    BYTE    number of NetBIOS interface-busy errors
  6603.  D1h    BYTE    last NetBIOS bad post command
  6604.  D2h    BYTE    last NetBIOS bad redirector command
  6605.  D3h    BYTE    do send datagram send/receive error command
  6606.  D4h    DWORD    -> DOS system parameter table
  6607.  D8h    WORD    number of DOS physical drives
  6608.  DAh    WORD    offset of DOS PSP field in DOS data segment
  6609.  DCh    WORD    offset of in-DOS flag in DOS data segment
  6610.  DEh    WORD    DOS data segment
  6611.  E0h    WORD    offset of DOS SFT in DOS data segment
  6612.  E2h    WORD    offset of number-of-physical-units field in DOS data segment
  6613.  E4h    WORD    10Net code segment
  6614.  E6h    WORD    10Net data segment
  6615.  E8h    WORD    10Net common server segment
  6616.  EAh    WORD    10Net file server segment
  6617.  ECh    WORD    10Net print server segment
  6618.  EEh    WORD    10Net remote printer segment
  6619. Note:    documentation lists field at offset D0h as a WORD, but all following
  6620.       offsets are as though it were a BYTE; if it is indeed a WORD, all
  6621.       offsets after D0h must be increased by one byte
  6622.  
  6623. Format of 10Net Table Header:
  6624. Offset    Size    Description
  6625.  -16  4 BYTEs    table identifier
  6626.  -12    WORD    peak number of tables allocated
  6627.  -10    WORD    number of tables currently in use
  6628.  -8    WORD    total number of tables
  6629.  -6    WORD    size of each table
  6630.  -4    WORD    offset of first allocated table
  6631.  -2    WORD    offset of first free table
  6632.  
  6633. Bitfields for services mask:
  6634.  bit 0    workstation
  6635.  bit 1    file server
  6636.  bit 2    print queue server
  6637.  bit 3    de-spool server
  6638.  
  6639. Bitfields for chat mask:
  6640.  bit 0    chat permitted
  6641.  bit 1    bell enabled
  6642.  bit 2    chat keyboard initiated
  6643.  bit 3    in INT 16 handler
  6644.  bit 4    in Get Input
  6645.  bit 5    display has timed out
  6646.  bit 6    chat is idle
  6647.  
  6648. Bitfields for internal system bits:
  6649.  bit 0    submit permitted
  6650.  bit 1    submit initiated
  6651.  bit 2    submit executing
  6652.  bit 3    internal client call/chat/spool/autospool
  6653.  bit 4    in spool termination
  6654.  bit 5    print permitted
  6655.  bit 6    waiting for keyboard input
  6656.  
  6657. Bitfields for 10Net System Flags:
  6658.  bit 0    in NetBIOS
  6659.  bit 1    processing INT 28
  6660.  bit 2    is server
  6661.  bit 3    in net user-DOS function
  6662.  bit 4    in DOS user-DOS function
  6663.  bit 5    in net for user non-DOS function
  6664.  bit 6    in server DOS function
  6665.  bit 7    in server non-DOS function
  6666.  bit 8    in terminate
  6667.  bit 10    in user on server request
  6668.  bit 13    in DOS for user on server
  6669.  bit 14    disable critical error handler
  6670.  
  6671. Bitfields for Monitor Flags:
  6672.  bit 0    waiting for monitor response
  6673.  bit 4    in monitor get-input routine
  6674.  bit 5    monitor display timeout
  6675.  bit 6    sensing for escape key
  6676. --------D-215E02-----------------------------
  6677. INT 21 - DOS 3.1+ network - SET NETWORK PRINTER SETUP STRING
  6678.     AX = 5E02h
  6679.     BX = redirection list index (see AX=5F02h)
  6680.     CX = length of setup string
  6681.     DS:SI -> setup string
  6682. Return: CF clear if successful
  6683.     CF set on error
  6684.         AX = error code (01h) (see AH=59h)
  6685. Note:    also supported by 10NET v5.0
  6686. SeeAlso: AX=5E03h,INT 2F/AX=111Fh
  6687. --------D-215E03-----------------------------
  6688. INT 21 - DOS 3.1+ network - GET NETWORK PRINTER SETUP STRING
  6689.     AX = 5E03h
  6690.     BX = redirection list index (see AX=5F02h)
  6691.     ES:DI -> 64-byte buffer for setup string
  6692. Return: CF clear if successful
  6693.         CX = length of setup string
  6694.         ES:DI buffer filled
  6695.     CF set on error
  6696.         AX = error code (01h) (see AH=59h)
  6697. Note:    also supported by 10NET v5.0, but 10NET is documented as using DS:SI
  6698.       instead of ES:DI
  6699. SeeAlso: AX=5E02h,INT 2F/AX=111Fh
  6700. --------D-215E04-----------------------------
  6701. INT 21 - DOS 3.1+ network - SET PRINTER MODE
  6702.     AX = 5E04h
  6703.     BX = redirection list index (see AX=5F02h)
  6704.     DX = mode
  6705.         bit 0: set if binary, clear if text (tabs expanded to blanks)
  6706. Return: CF set on error
  6707.         AX = error code (see AH=59h)
  6708.     CF clear if successful
  6709. Note:    calls INT 2F/AX=111Fh with 5E04h on stack
  6710. SeeAlso: AX=5E05h"DOS",INT 2F/AX=111Fh
  6711. --------N-215E04-----------------------------
  6712. INT 21 - 10NET v5.0 - INITIATE PRINT JOB
  6713.     AX = 5E04h
  6714.     BX = zero-based redirection list index (see AX=5F02h)
  6715.     DS:DX -> extended workstation printer setup structure (see below)
  6716. Return: CF clear if successful
  6717.     CF set on error
  6718.         AX = error code (see AH=59h)
  6719. SeeAlso: AX=5E05h"10NET",AX=5E06h"10NET"
  6720.  
  6721. Format of extended workstation printer setup structure:
  6722. Offset    Size    Description
  6723.  00h    BYTE    notification flags (see below)
  6724.  01h    BYTE    job control mask (see below)
  6725.  02h    WORD    days to retain file
  6726.  04h    WORD    test print length
  6727.  06h    BYTE    number of copies to print
  6728.  07h    BYTE    compression algorithm
  6729.  08h    BYTE    tab width (00h = don't expand)
  6730.  09h    BYTE    initiation type (00h normal, 01h non-spooled)
  6731.  0Ah 38 BYTEs    job start operation notification instructions
  6732.  30h 32 BYTEs    comment for job
  6733.  50h 64 BYTEs    output filename or non-spooled file
  6734.  
  6735. Bitfields for notification flags:
  6736.  bit 0    user at print start
  6737.  bit 1    operator at start, with reply
  6738.  bit 2    user at print completion
  6739.  bit 3    operator at completion, with reply
  6740.  bit 4    user on queue switch
  6741.  bit 5    operator on queue switch, with reply
  6742.  bit 6    user on print error
  6743.  
  6744. Bitfields for job control mask:
  6745.  bit 0    print banner page
  6746.  bit 1    eject page at end of job
  6747.  bit 2    mark as "held" (queue but don't print)
  6748.  bit 3    rush job (queue at top)
  6749.  bit 4    overwrite file with zeros before deletion
  6750.  bit 5    hyperspool if possible
  6751. --------D-215E05-----------------------------
  6752. INT 21 - DOS 3.1+ network - GET PRINTER MODE
  6753.     AX = 5E05h
  6754.     BX = redirection list index (see AX=5F02h)
  6755. Return: CF set on error
  6756.         AX = error code (see AH=59h)
  6757.     CF clear if successful
  6758.         DX = printer mode (see AX=5E04h)
  6759. Note:    calls INT 2F/AX=111Fh with 5E05h on stack
  6760. SeeAlso: AX=5E04h"DOS",INT 2F/AX=111Fh
  6761. --------N-215E05-----------------------------
  6762. INT 21 - 10NET v5.0 - TERMINATE PRINT JOB
  6763.     AX = 5E05h
  6764.     BX = zero-based redirection list index (see AX=5F02h)
  6765. Return: CF clear if successful
  6766.     CF set on error
  6767.         AX = error code (see AH=59h)
  6768. Note:    this call resets the spool termination mode to "truncate"
  6769.       (see AX=5D08h)
  6770. SeeAlso: AX=5E04h"10NET",AX=5E06h
  6771. --------N-215E06-----------------------------
  6772. INT 21 - 10NET v5.0 - GET/SET 10NET WORKSTATION PRINTER SETUP STRUCTURE
  6773.     AX = 5E06h
  6774.     BX = zero-based redirection list index (see AX=5F02h)
  6775.     CX = operation (06h set, 07h get)
  6776.     DS:DX -> buffer for setup structure (same as first nine bytes of
  6777.         workstation printer setup) (see AX=5E04h"10NET")
  6778. Return: CF clear if successful
  6779.         DS:DX buffer updated on get
  6780.     CF set on error
  6781.         AX = error code (see AH=59h)
  6782. SeeAlso: AX=5E04h"10NET",AX=5E05h"10NET"
  6783. --------D-215F00-----------------------------
  6784. INT 21 - DOS 3.1+ network - GET REDIRECTION MODE
  6785.     AX = 5F00h
  6786.     BL = redirection type
  6787.         03h printer
  6788.         04h disk drive
  6789. Return: CF set on error
  6790.         AX = error code (see AH=59h)
  6791.     CF clear if successful
  6792.         BH = redirection state
  6793.         00h off
  6794.         01h on
  6795. Note:    calls INT 2F/AX=111Eh with AX on top of the stack
  6796. SeeAlso: AX=5F01h,INT 2F/AX=111Eh
  6797. --------D-215F01-----------------------------
  6798. INT 21 - DOS 3.1+ network - SET REDIRECTION MODE
  6799.     AX = 5F01h
  6800.     BL = redirection type
  6801.         03h printer
  6802.         04h disk drive
  6803.     BH = redirection state
  6804.         00h off
  6805.         01h on
  6806. Return: CF set on error
  6807.         AX = error code (see AH=59h)
  6808.     CF clear if successful
  6809. Notes:    when redirection is off, the local device (if any) rather than the
  6810.       remote device is used
  6811.     calls INT 2F/AX=111Eh with AX on top of the stack
  6812. SeeAlso: AX=5F00h,INT 2F/AX=111Eh
  6813. --------D-215F02-----------------------------
  6814. INT 21 - DOS 3.1+ network - GET REDIRECTION LIST ENTRY
  6815.     AX = 5F02h
  6816.     BX = zero-based redirection list index
  6817.     CX = 0000h (LANtastic)
  6818.     DS:SI -> 16-byte buffer for ASCIZ local device name
  6819.     ES:DI -> 128-byte buffer for ASCIZ network name
  6820. Return: CF clear if successful
  6821.         BH = device status
  6822.         00h valid
  6823.         01h invalid
  6824.         BL = device type
  6825.         03h printer
  6826.         04h disk drive
  6827.         CX = user data previously set with AX=5F03h
  6828.         DS:SI and ES:DI buffers filled
  6829.         DX,BP destroyed
  6830.     CF set on error
  6831.         AX = error code (01h,12h) (see AH=59h)
  6832. Notes:    this function is passed through to INT 2F/AX=111Eh by the DOS kernel
  6833.     error code 12h is returned if BX is greater than the size of the list
  6834.     also supported by Banyan VINES, PC-NFS, LANtastic, and 10NET
  6835. SeeAlso: AX=5F03h,INT 2F/AX=111Eh
  6836. --------D-215F03-----------------------------
  6837. INT 21 - DOS 3.1+ network - REDIRECT DEVICE
  6838.     AX = 5F03h
  6839.     BL = device type
  6840.         03h printer
  6841.         04h disk drive
  6842.     CX = user data to save
  6843.         0000h for LANtastic
  6844.         4E57h ("NW") for NetWare 4.0 requester
  6845.     DS:SI -> ASCIZ local device name (16 bytes max)
  6846.     ES:DI -> ASCIZ network name + ASCIZ password (128 bytes max total)
  6847. Return: CF clear if successful
  6848.     CF set on error
  6849.         AX = error code (01h,03h,05h,08h,0Fh,12h) (see AH=59h)
  6850. Notes:    if device type is disk drive, DS:SI must point at either a null string
  6851.       or a string consisting the drive letter followed by a colon; if a
  6852.       null string, the network attempts to access the destination without
  6853.       redirecting a local drive
  6854.     the DOS kernel calls INT 2F/AX=111Eh with AX on top of the stack
  6855.     also supported by Banyan VINES, LANtastic, and 10NET
  6856. SeeAlso: AX=5F02h,AX=5F04h,INT 2F/AX=111Eh
  6857. --------D-215F04-----------------------------
  6858. INT 21 - DOS 3.1+ network - CANCEL REDIRECTION
  6859.     AX = 5F04h
  6860.     DS:SI -> ASCIZ local device name or path
  6861.     CX = 4E57h ("NW") for NetWare 4.0 requester
  6862. Return: CF clear if successful
  6863.     CF set on error
  6864.         AX = error code (01h,03h,05h,08h,0Fh,12h) (see AH=59h)
  6865. Notes:    the DS:SI string must be either a local device name, a drive letter
  6866.       followed by a colon, or a network directory beginning with two
  6867.       backslashes
  6868.     the DOS kernel calls INT 2F/AX=111Eh with AX on top of the stack
  6869.     also supported by Banyan VINES, LANtastic, and 10NET
  6870. SeeAlso: AX=5F03h,INT 2F/AX=111Eh
  6871. --------D-215F05-----------------------------
  6872. INT 21 - DOS 4+ network - GET EXTENDED REDIRECTION LIST ENTRY
  6873.     AX = 5F05h
  6874.     BX = redirection list index
  6875.     DS:SI -> buffer for ASCIZ source device name
  6876.     ES:DI -> buffer for destination ASCIZ network path
  6877. Return: CF set on error
  6878.         AX = error code (see AH=59h)
  6879.     CF clear if successful
  6880.         AX = server's netowrk process ID handle (10NET)
  6881.         BH = device status flag (bit 0 clear if valid)
  6882.         BL = device type (03h if printer, 04h if drive)
  6883.         CX = stored parameter value (user data) from AX=5F03h
  6884.         BP = NETBIOS local session number
  6885.         DS:SI buffer filled
  6886.         ES:DI buffer filled
  6887. Notes:    the local session number allows sharing the redirector's session number
  6888.     if an error is caused on the NETBIOS LSN, the redirector may be unable
  6889.       to correctly recover from errors
  6890.     the DOS kernel calls INT 2F/AX=111Eh with AX on top of the stack
  6891.     supported by DR-DOS 5.0
  6892.     also supported by 10NET v5.0
  6893. SeeAlso: AX=5F06h"Network",INT 2F/AX=111Eh
  6894. --------O-215F05-----------------------------
  6895. INT 21 - STARLITE architecture - MAP LOCAL DRIVE LETTER TO REMOTE FILE SYSTEM
  6896.     AX = 5F05h
  6897.     DL = drive number (0=A:)
  6898.     DS:SI -> ASCIZ name of the object to map the drive to
  6899. Return: CF set on error
  6900.         AX = error code (see AH=59h)
  6901.     CF clear if successful
  6902. SeeAlso: AX=5F06h"STARLITE"
  6903. --------N-215F06-----------------------------
  6904. INT 21 U - Network - GET FULL REDIRECTION LIST
  6905.     AX = 5F06h
  6906.     ???
  6907. Return: ???
  6908. Notes:    similar to AX=5F02h and AX=5F05h, but also returns redirections
  6909.       excluded from those calls for various reasons
  6910.     calls INT 2F/AX=111Eh with AX on top of the stack
  6911. SeeAlso: AX=5F05h"DOS",INT 2F/AX=111Eh
  6912. --------O-215F06-----------------------------
  6913. INT 21 - STARLITE architecture - UNMAP DRIVE LETTER
  6914.     AX = 5F06h
  6915.     DL = drive to be unmapped (0=A:)
  6916. Return: CF set on error
  6917.         AX = error code (see AH=59h)
  6918.     CF clear if successful
  6919. SeeAlso: AX=5F05h"STARLITE"
  6920. --------D-215F07-----------------------------
  6921. INT 21 - DOS 5+ - ENABLE DRIVE
  6922.     AX = 5F07h
  6923.     DL = drive number (0=A:)
  6924. Return: CF clear if successful
  6925.     CF set on error
  6926.         AX = error code (0Fh) (see AH=59h)
  6927. Note:    simply sets the "valid" bit in the drive's CDS
  6928. SeeAlso: AH=52h,AX=5F08h"DOS"
  6929. --------O-215F07-----------------------------
  6930. INT 21 - STARLITE architecture - MAKE NAMED OBJECT AVAILABLE ON NETWORK
  6931.     AX = 5F07h
  6932.     DS:SI -> ASCIZ name of object to offer to network
  6933.     ES:DI -> ASCIZ name under which object will be known on the network
  6934.         MUST begin with three slashes
  6935. Return: CF set on error
  6936.         AX = error code (see AH=59h)
  6937.     CF clear if successful
  6938. SeeAlso: AX=5F08h"STARLITE"
  6939. --------D-215F08-----------------------------
  6940. INT 21 - DOS 5+ - DISABLE DRIVE
  6941.     AX = 5F08h
  6942.     DL = drive number (0=A:)
  6943. Return: CF clear if successful
  6944.     CF set on error
  6945.         AX = error code (0Fh) (see AH=59h)
  6946. Note:    simply clears the "valid" bit in the drive's CDS
  6947. SeeAlso: AH=52h,AX=5F07h"DOS"
  6948. --------O-215F08-----------------------------
  6949. INT 21 - STARLITE architecture - REMOVE GLOBAL NETWORK NAME OF OBJECT
  6950.     AX = 5F08h
  6951.     DS:SI -> ASCIZ network name (not local name) of object to unshare
  6952. Return: CF set on error
  6953.         AX = error code (see AH=59h)
  6954.     CF clear if successful
  6955. SeeAlso: AX=5F07h"STARLITE"
  6956. --------O-215F09-----------------------------
  6957. INT 21 - STARLITE architecture - BIND TO NETWORK DEVICE
  6958.     AX = 5F09h
  6959.     DS:DX -> ASCIZ name of the device driver to attach to
  6960. Return: CF set on error
  6961.         AX = error code (see AH=59h)
  6962.     CF clear if successful
  6963. Note:    the STARLITE distributed file system can attach to multiple networks
  6964.       simultaneously
  6965. SeeAlso: AX=5F0Ah
  6966. --------O-215F0A-----------------------------
  6967. INT 21 - STARLITE architecture - DETACH FROM NETWORK DEVICE
  6968.     AX = 5F0Ah
  6969.     DS:DX -> ASCIZ name of device driver to detach from
  6970. Return: CF set on error
  6971.         AX = error code (see AH=59h)
  6972.     CF clear if successful
  6973. SeeAlso: AX=5F09h
  6974. --------N-215F30-----------------------------
  6975. INT 21 U - LAN Manager Enhanced DOS - ???
  6976.     AX = 5F30h
  6977.     ???
  6978. Return: ???
  6979. --------N-215F32-----------------------------
  6980. INT 21 u - Named Pipes - LOCAL DosQNmPipeInfo
  6981.     AX = 5F32h
  6982.     BX = handle
  6983.     CX = size of _PIPEINFO structure
  6984.     DX = level (must be 0001h)
  6985.     DS:SI -> _PIPEINFO structure (see below)
  6986. Return: CF clear if successful
  6987.         _PIPEINFO structure filled in
  6988.     CF set on error
  6989.         AX = error code
  6990. Note:    this function was introduced by LAN Manager but is also supported by
  6991.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  6992.       Machines, and others
  6993. SeeAlso: AX=5F33h,AX=5F34h
  6994.  
  6995. Format of _PIPEINFO structure:
  6996. Offset    Size    Description
  6997.  00h    WORD    size of outgoing buffer
  6998.  02h    WORD    size of incoming buffer
  6999.  04h    BYTE    maximum number of instances allowed
  7000.  05h    BYTE    current number of instances
  7001.  06h    BYTE    length of the name (including terminating NUL)
  7002.  07h  N BYTEs    name
  7003. --------N-215F33-----------------------------
  7004. INT 21 u - Named Pipes - LOCAL DosQNmPHandState
  7005.     AX = 5F33h
  7006.     BX = handle
  7007. Return: CF clear if successful
  7008.         AH = pipe mode bit mask (see below)
  7009.         AL = maximum number of instances
  7010.     CF set on error
  7011.         AX = error code
  7012. Note:    this function was introduced by LAN Manager but is also supported by
  7013.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  7014.       Machines, and others
  7015. SeeAlso: AX=5F32h,AX=5F34h
  7016.  
  7017. Bitfields for pipe mode:
  7018.  bit 7    set if nonblocking, clear if blocking
  7019.  bit 6    set if server end, clear if client end
  7020.  bit 2    set if write in message mode, clear if write in byte mode
  7021.  bit 0    set if read in message mode, clear if read in byte mode
  7022. --------N-215F34-----------------------------
  7023. INT 21 u - Named Pipes - LOCAL DosSetNmPHandState
  7024.     AX = 5F34h
  7025.     BX = handle
  7026.     CX = pipe mode bit mask
  7027.         bit 15: set if nonblocking, clear if blocking
  7028.         bit     8: set if read in message mode, clear if read in byte mode
  7029. Return: CF clear if successful
  7030.     CF set if error
  7031.         AX = error code
  7032. Note:    this function was introduced by LAN Manager but is also supported by
  7033.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  7034.       Machines, and others
  7035. SeeAlso: AX=5F32h,AX=5F33h,AX=5F36h
  7036. --------N-215F35-----------------------------
  7037. INT 21 u - Named Pipes - LOCAL DosPeekNmPipe
  7038.     AX = 5F35h
  7039.     BX = handle
  7040.     CX = buffer length
  7041.     DS:SI -> buffer
  7042. Return: CF clear if successful
  7043.         CX = bytes read
  7044.         SI = bytes left in the pipe
  7045.         DX = bytes left in the current message
  7046.         DI = pipe status
  7047.         0001h disconnected
  7048.         0002h listening
  7049.         0003h connected
  7050.         0004h closing
  7051.     CF set if error
  7052.         AX = error code
  7053. Note:    this function was introduced by LAN Manager but is also supported by
  7054.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  7055.       Machines, and others
  7056. SeeAlso: AX=5F38h,AX=5F39h,AX=5F51h
  7057. --------N-215F36-----------------------------
  7058. INT 21 u - Named Pipes - LOCAL DosTransactNmPipe
  7059.     AX = 5F36h
  7060.     BX = handle
  7061.     CX = in buffer length
  7062.     DS:SI -> in buffer
  7063.     DX = out buffer length
  7064.     ES:DI -> out buffer
  7065. Return: CF clear if successful
  7066.         CX = bytes read
  7067.     CF set on error
  7068.         AX = error code
  7069. Note:    this function was introduced by LAN Manager but is also supported by
  7070.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  7071.       Machines, and others
  7072. SeeAlso: AX=5F34h,AX=5F37h
  7073. --------N-215F37-----------------------------
  7074. INT 21 u - Named Pipes - DosCallNmPipe
  7075.     AX = 5F37h
  7076.     DS:SI -> DosCallNmPipe stack frame (see below)
  7077. Return: CF clear if successful
  7078.         CX = bytes read
  7079.     CF set on error
  7080.         AX = error code
  7081. Note:    this function was introduced by LAN Manager but is also supported by
  7082.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  7083.       Machines, and others
  7084. SeeAlso: AX=5F36h,AX=5F38h
  7085.  
  7086. Format of DosCallNmPipe stack frame:
  7087. Offset    Size    Description
  7088.  00h    DWORD    timeout
  7089.  04h    DWORD    -> bytes read WORD (not used!!)
  7090.  08h    WORD    out buffer length
  7091.  0Ah    DWORD    address of out buffer
  7092.  0Eh    WORD    in buffer length
  7093.  10h    DWORD    address of in buffer
  7094.  14h    DWORD    address of pipe name
  7095. --------N-215F38-----------------------------
  7096. INT 21 u - Named Pipes - LOCAL DosWaitNmPipe
  7097.     AX = 5F38h
  7098.     DS:DX -> pipe name
  7099.     BX:CX = timeout value
  7100. Return: CF clear if successful
  7101.     CF set if error
  7102.         AX = error code
  7103. Note:    this function was introduced by LAN Manager but is also supported by
  7104.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  7105.       Machines, and others
  7106. SeeAlso: AX=5F37h,AX=5F39h
  7107. --------N-215F39-----------------------------
  7108. INT 21 U - Named Pipes - LOCAL DosRawReadNmPipe
  7109.     AX = 5F39h
  7110.     BX = handle
  7111.     CX = buffer length
  7112.     DS:DX -> buffer
  7113. Return: CF clear if successful
  7114.         CX = bytes read
  7115.     CF set if error
  7116.         AX = error code
  7117. Notes:    this function was introduced by LAN Manager but is also supported by
  7118.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  7119.       Machines, and others
  7120.     not documented in the LAN Manager Toolkit
  7121. SeeAlso: AX=5F35h,AX=5F3Ah,INT 2F/AX=1186h
  7122. --------N-215F3A-----------------------------
  7123. INT 21 U - Named Pipes - LOCAL DosRawWriteNmPipe
  7124.     AX = 5F3Ah
  7125.     BX = handle
  7126.     CX = buffer length
  7127.     DS:DX -> buffer
  7128. Return: CF clear if successful
  7129.         CX = bytes written
  7130.     CF set if error
  7131.         AX = error code
  7132. Notes:    this function was introduced by LAN Manager but is also supported by
  7133.       the Novell DOS Named Pipe Extender, Banyan VINES, OS/2 Virtual DOS
  7134.       Machines, and others
  7135.     not documented in the LAN Manager Toolkit
  7136. SeeAlso: AX=5F39h,AX=5F3Bh,INT 2F/AX=118Fh
  7137. --------N-215F3B-----------------------------
  7138. INT 21 u - LAN Manager Enhanced DOS - NetHandleSetInfo
  7139.     AX = 5F3Bh
  7140.     BX = handle
  7141.     CX = handle_info_1 structure length or sizeof DWORD
  7142.     DI = parameter number to set
  7143.         0000h all
  7144.         0001h number of milliseconds
  7145.         0002h number of characters
  7146.     DS:DX -> handle_info_1 structure (DI=0000h) (see below)
  7147.         or DWORD (DI=0001h or 0002h)
  7148.     SI = level of information (0001h)
  7149. Return: CF clear if successful
  7150.         CX = total bytes available
  7151.     CF set if error
  7152.         AX = error code
  7153. SeeAlso: AX=5F3Ch
  7154.  
  7155. Format of handle_info_1 structure:
  7156. Offset    Size    Description
  7157.  00h    DWORD    number of milliseconds which workstations collects data before
  7158.         it sends the data to the named pipe
  7159.  04h    DWORD    number of characters which workstations collects before it
  7160.         sends the data to the named pipe
  7161. --------N-215F3C-----------------------------
  7162. INT 21 u - LAN Manager Enhanced DOS - NetHandleGetInfo
  7163.     AX = 5F3Ch
  7164.     BX = handle
  7165.     CX = length of handle_info_1 structure
  7166.     DS:DX -> handle_info_1 structure (see AX=5F3Bh)
  7167.     SI = level of information (must be 0001h)
  7168. Return: CF clear if successful
  7169.         CX = total bytes available
  7170.     CF set if error
  7171.         AX = error code
  7172. SeeAlso: AX=5F3Bh
  7173. --------N-215F3D-----------------------------
  7174. INT 21 U - LAN Manager Enhanced DOS - WRITE MAILSLOT???
  7175.     AX = 5F3Dh
  7176.     ???
  7177. Return: ???
  7178. --------N-215F3E-----------------------------
  7179. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetSpecialSMB
  7180.     AX = 5F3Eh
  7181.     ???
  7182. Return: ???
  7183. Note:    This function is not documented anywhere in the LAN Manager 2.x Toolkit
  7184.       but was documented in LAN Manager 1.x manuals.
  7185. --------N-215F3F-----------------------------
  7186. INT 21 U - LAN Manager Enhanced DOS - REMOTE API CALL
  7187.     AX = 5F3Fh
  7188.     CX = api number
  7189.     ES:DI -> data descriptor
  7190.     ES:SI -> parameter descriptor
  7191.     ES:DX -> auxiliary descriptor (if DX <> 0)
  7192.     ???
  7193. Return: ???
  7194. --------N-215F40-----------------------------
  7195. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetMessageBufferSend
  7196.     AX = 5F40h
  7197.     DS:DX -> NetMessageBufferSend parameter structure (see below)
  7198. Return: AX = error code
  7199.  
  7200. Format of NetMessageBufferSend parameter structure:
  7201. Offset    Size    Description
  7202.  00h    DWORD    -> recipient name (name for specific user, name* for domain
  7203.             name wide, * for broadcast)
  7204.  04h    DWORD    -> buffer
  7205.  08h    WORD    length of buffer
  7206. --------N-215F41-----------------------------
  7207. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetServiceEnum
  7208.     AX = 5F41h
  7209.     BL = level of detail (0000h, 0001h or 0002h)
  7210.     CX = buffer length
  7211.     ES:DI -> buffer of service_info_0, service_info_1, or service_info_2
  7212.         (see below)
  7213. Return: CF clear if successful
  7214.         CX = entries read
  7215.         DX = total available
  7216.     CF set on error
  7217.         AX = error code
  7218.  
  7219. Format of service_info_0 structure:
  7220. Offset    Size    Description
  7221.  00h 16 BYTEs    name
  7222.  
  7223. Format of service_info_1 structure:
  7224. Offset    Size    Description
  7225.  00h 16 BYTEs    name
  7226.  10h    WORD    status bitmask (see below)
  7227.  12h    DWORD    status code (see below)
  7228.         (also see Microsoft LAN Manager Programmer's Reference)
  7229.  16h    WORD    process id
  7230.  
  7231. Format of service_info_2 structure:
  7232. Offset    Size    Description
  7233.  00h 16 BYTEs    name
  7234.  10h    WORD    status bitmask (see below)
  7235.  12h    DWORD    status code (see below)
  7236.  16h    WORD    process id
  7237.  18h 64 BYTEs    text
  7238.  
  7239. Bitfields for status bitmask:
  7240.  bits 0,1    00 uninstall
  7241.         01 install pending
  7242.         10 uninstall pending
  7243.         11 installed
  7244.  bits 2,3    00 active
  7245.         01 Continue pending
  7246.         10 Pause pending
  7247.         11 paused
  7248.  bit 4    uninstallable
  7249.  bit 5    pausable
  7250.  bit 8    disk redirector paused
  7251.  bit 9    spooled device redirector paused (printing)
  7252.  bit 10 communication device redirector paused
  7253.  
  7254. Values for status code:
  7255.  high word
  7256.     3051 Bad parameter value
  7257.     3052 A parameter is missing
  7258.     3053 An unknown parameter was specified
  7259.     3054 The resource is insufficient
  7260.     3055 Configuration is faulty
  7261.     3056 An MS-DOS or MS OS/2 error occured
  7262.     3057 An internal error occured
  7263.     3058 An ambiguous parameter name was given
  7264.     3059 A duplicate parameter exists
  7265.     3060 The service was terminated by NetSeviceControl when it did not respond
  7266.     3061 The service program file could not be executed
  7267.     3062 The subservice failed to start
  7268.     3063 There is a conflict in the value or use of these parameters
  7269.     3064 There is a problem with the file
  7270.  low word
  7271.     3070 There is insufficient memory
  7272.     3071 There is insufficeient disk space
  7273.     3072 Unable to create thread
  7274.     3073 Unable to create process
  7275.     3074 A security failure occured
  7276.     3075 There is bad or missing default path
  7277.     3076 Network software is not installed
  7278.     3077 Server software is not installed
  7279.     3078 The server could not access the UAS database
  7280.     3079 The action requires user-level security
  7281.     3080 The log directory is invalid
  7282.     3081 The LAN group specificed could not be used
  7283.     3082 The computername is being used as a message alias on another computer
  7284.     3083 The workstation failed to announce the servername
  7285.     3084 The user accounts system is not configured properly
  7286. --------N-215F42-----------------------------
  7287. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetServiceControl
  7288.     AX = 5F42h
  7289.     DH = opcode
  7290.         00h interrogate status
  7291.         01h pause
  7292.         02h continue
  7293.         03h uninstall
  7294.     DL = argument
  7295.         01h disk resource
  7296.         02h print resource
  7297.         04h communications resource (not implemented for DOS)
  7298.     ES:BX -> NetServiceControl parameter structure (see below)
  7299. Return: CF clear if successful
  7300.     CF set on error
  7301.         AX = error code
  7302.  
  7303. Format of NetServiceControl parameter structure:
  7304. Offset    Size    Description
  7305.  00h    DWORD    -> service name
  7306.  04h    WORD    result buffer size
  7307.  06h    DWORD    -> result buffer as service_info_2 structure
  7308. --------N-215F43-----------------------------
  7309. INT 21 u - LAN Manager Enhanced DOS - LOCAL DosPrintJobGetId
  7310.     AX = 5F43h
  7311.     BX = handle of remote print job
  7312.     CX = size of PRIDINFO struture
  7313.     ES:DI -> PRIDINFO structure (see below)
  7314. Return: CF clear if successful
  7315.         PRIDINFO filled in
  7316.     CF set on error
  7317.         AX = error code
  7318.  
  7319. Format of PRIDINFO structure:
  7320. Offset    Size    Description
  7321.  00h    WORD    job id
  7322.  02h 16 BYTEs    server name
  7323.  12h 13 BYTEs    queue name
  7324.  1Fh  1 BYTE    pad
  7325. --------N-215F44-----------------------------
  7326. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetWkstaGetInfo
  7327.     AX = 5F44h
  7328.     BX = information level (00h, 01h, or 0Ah)
  7329.     CX = buffer size
  7330.     ES:DI = buffer in which to store info
  7331. Return: AX = error code
  7332.     DX = amount of buffer used (or required)
  7333. SeeAlso: AX=5F45h,AX=5F49h
  7334. --------N-215F45-----------------------------
  7335. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetWkstaSetInfo
  7336.     AX = 5F45h
  7337.     BX = level (0000h or 0001h)
  7338.     CX = buffer size
  7339.     DX = parameter to set
  7340.     ES:DI -> buffer
  7341. Return: CF clear if successful
  7342.     CF set if error
  7343.         AX = error code
  7344. SeeAlso: AX=5F44h
  7345. --------N-215F46-----------------------------
  7346. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetUseEnum
  7347.     AX = 5F46h
  7348.     BX = level (0000h or 0001h)
  7349.     CX = size of buffer
  7350.     ES:DI -> buffer of use_info_0 or use_info_1 structures (see below)
  7351. Return: CF clear if successful
  7352.         CX = entries read
  7353.         DX = total available entries
  7354.     CF set if error
  7355.         AX = error code
  7356. SeeAlso: AX=5F47h,AX=5F48h,AX=5F4Ch
  7357.  
  7358. Format of use_info_0 structure:
  7359. Offset    Size    Description
  7360.  00h  9 BYTEs    local device name
  7361.  09h    BYTE    padding
  7362.  0Ah    DWORD    -> remote device name in UNC form \\server\share
  7363.  
  7364. Format of use_info_1 structure:
  7365. Offset    Size    Description
  7366.  00h  9 BYTEs    Local device name
  7367.  09h    BYTE    padding
  7368.  0Ah    DWORD    -> remote device name in UNC form \\server\share
  7369.  0Eh    DWORD    -> password
  7370.  12h    WORD    ignored
  7371.  14h    WORD    use type (-1 wildcard, 0 disk, 1 print, 2 com, 3 ipc)
  7372.  16h    WORD    ignored
  7373.  18h    WORD    ignored
  7374. --------N-215F47-----------------------------
  7375. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetUseAdd
  7376.     AX = 5F47h
  7377.     BX = level (0001h)
  7378.     CX = size of use_info_1 structure
  7379.     ES:DI -> use_info_1 structure (see AX=5F46h)
  7380. Return: CF clear on success
  7381.     CF set on error
  7382.         AX = error code
  7383. SeeAlso: AX=5F46h,AX=5F48h
  7384. --------N-215F48-----------------------------
  7385. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetUseDel
  7386.     AX = 5F48h
  7387.     BX = force level
  7388.         0000h no force
  7389.         0001h force
  7390.         0002h lots of force
  7391.     ES:DI -> buffer as either the local device name or UNC remote name
  7392. Return: CF clear on success
  7393.     CF set on error
  7394.         AX = error code
  7395. SeeAlso: AX=5F46h,AX=5F48h,AX=5F49h
  7396. --------N-215F49-----------------------------
  7397. INT 21 u - LAN Manager Enhanced DOS - NetUseGetInfo
  7398.     AX = 5F49h
  7399.     DS:DX -> NetUseGetInfo parameter structure
  7400. Return: CF clear on success
  7401.         DX = total available
  7402.     CF set on error
  7403.         AX = error code
  7404. SeeAlso: AX=5F44h,AX=5F47h
  7405.  
  7406. Format of NetUseGetInfo parameter structure:
  7407. Offset    Size    Description
  7408.  00h    DWORD    pointer to either the local device name or UNC remote name
  7409.  04h    WORD    level of information (0000h or 0001h)
  7410.  06h    DWORD    pointer to buffer of use_info_0 or use_info_1 structures
  7411.  0Ah    WORD    length of buffer
  7412. --------N-215F4A-----------------------------
  7413. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetRemoteCopy
  7414.     AX = 5F4Ah
  7415.     DS:DX -> NetRemoteCopy parameter structure
  7416. Return: CF clear if successful
  7417.     CF set on error
  7418.         AX = error code
  7419. SeeAlso: AX=5F4Bh
  7420.  
  7421. Format of NetRemoteCopy parameter structure:
  7422. Offset    Size    Description
  7423.  00h    DWORD    -> source name as UNC
  7424.  04h    DWORD    -> destination name as UNC
  7425.  08h    DWORD    -> source password
  7426.  0Ch    DWORD    -> destination password
  7427.  10h    WORD    destination open bitmap
  7428.         if destination path exists
  7429.             0000h open fails
  7430.             0001h file is appended
  7431.             0002h file is overwritten
  7432.         if destination path doesn't exist
  7433.             0000h open fails
  7434.             0010h file is created
  7435.  12h    WORD    copy control bitmap (see below)
  7436.  14h    DWORD    -> copy_info buffer
  7437.  18h    WORD    length of copy_info buffer
  7438.  
  7439. Bitfields for copy control:
  7440.  bit 0    destination must be a file
  7441.  bit 1    destination must be a directory
  7442.  bit 2    destination is opened in ascii mode instead of binary
  7443.  bit 3    source is opened in ascii mode instead of binary
  7444.  bit 4    verify all write operations
  7445. --------N-215F4B-----------------------------
  7446. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetRemoteMove
  7447.     AX = 5F4Bh
  7448.     DS:DX -> NetRemoteMove parameter structure
  7449. Return: CF clear if successful
  7450.     CF set on error
  7451.         AX = error code
  7452. SeeAlso: AX=5F4Ah
  7453.  
  7454. Format of NetRemoteMove parameter structure:
  7455. Offset    Size    Description
  7456.  00h    DWORD    -> source name as UNC
  7457.  04h    DWORD    -> destination name as UNC
  7458.  08h    DWORD    -> source password
  7459.  0Ch    DWORD    -> destination password
  7460.  10h    WORD    destination open bitmap
  7461.         if destination path exists
  7462.             0000h open fails
  7463.             0001h file is appended
  7464.             0002h file is overwritten
  7465.         if destination path doesn't exist
  7466.             0000h open fails
  7467.             0010h file is created
  7468.  12h    WORD    move control bitmap
  7469.             0001h destination must be a file
  7470.             0002h destination must be a directory
  7471.  14h    DWORD    -> move_info buffer
  7472.  18h    WORD    length of move_info buffer
  7473. --------N-215F4C-----------------------------
  7474. INT 21 u - LAN Manager Enhanced DOS - LOCAL NetServerEnum
  7475.     AX = 5F4Ch
  7476.     BX = level (0000h or 0001h)
  7477.     CX = buffer length
  7478.     ES:DI -> buffer in which to store information
  7479. Return: CF clear if successful
  7480.         ES:DI -> server_info_X structures (depending on level) (see below)
  7481.         BX = entries read
  7482.         CX = total entries available
  7483.     CF set on error
  7484.         AX = error code
  7485. Notes:    this function is also supported by the Novell DOS Named Pipe Extender
  7486.     this function has been obseleted by NetServerEnum2
  7487. SeeAlso: AX=5F53h
  7488.  
  7489. Format of server_info_0 structure:
  7490. Offset    Size    Description
  7491.  00h 16 BYTEs    name
  7492.  
  7493. Format of server_info_1 structure:
  7494. Offset    Size    Description
  7495.  00h 16 BYTEs    name
  7496.  10h    BYTE    major version in lower nibble
  7497.  11h    BYTE    minor version
  7498.  12h    DWORD    server type bitmask (see below)
  7499.  16h    DWORD    -> comment string
  7500.  
  7501. Bitfields for server type:
  7502.  bit 0    workstation
  7503.  bit 1    server
  7504.  bit 2    SQL server
  7505.  bit 3    primary domain controller
  7506.  bit 4    backup domain controller
  7507.  bit 5    time server
  7508.  bit 6    Apple File Protocol (AFP) server
  7509.  bit 7    Novell server
  7510.  bit 8    Domain Member (v2.1+)
  7511.  bit 9    Print Queue server (v2.1+)
  7512.  bit 10 Dialin server (v2.1+)
  7513.  bit 11 Unix server (v2.1+)
  7514. --------N-215F4D-----------------------------
  7515. INT 21 u - LAN Manager Enhanced DOS - DosMakeMailslot
  7516.     AX = 5F4Dh
  7517.     BX = message size
  7518.     CX = mailslot size (must be bigger than message size by at least 1)
  7519.                (minimum 1000h, maximum FFF6h)
  7520.                (buffer must be 9 bytes bigger than this)
  7521.     DS:SI -> name
  7522.     ES:DI -> memory buffer
  7523. Return: CF clear if successful
  7524.         AX = handle
  7525.     CF set on error
  7526.         AX = error code
  7527. SeeAlso: AX=5F4Eh,AX=5F4Fh,AX=5F50h,AX=5F51h
  7528. --------N-215F4E-----------------------------
  7529. INT 21 u - LAN Manager Enhanced DOS - DosDeleteMailslot
  7530.     AX = 5F4Eh
  7531.     BX = handle
  7532. Return: CF clear if successful
  7533.         ES:DI -> memory to be freed (allocated during DosMakeMailslot)
  7534.     CF set on error
  7535.         AX = error code
  7536. SeeAlso: AX=5F4Dh,AX=5F4Fh
  7537. --------N-215F4F-----------------------------
  7538. INT 21 u - LAN Manager Enhanced DOS - DosMailslotInfo
  7539.     AX = 5F4Fh
  7540.     BX = handle
  7541. Return: CF clear if successful
  7542.         AX = max message size
  7543.         BX = mailslot size
  7544.         CX = next message size
  7545.         DX = next message priority
  7546.         SI = number of messages waiting
  7547.     CF set on error
  7548.         AX = error code
  7549. SeeAlso: AX=5F4Dh,AX=5F4Eh,AX=5F50h
  7550. --------N-215F50-----------------------------
  7551. INT 21 u - LAN Manager Enhanced DOS - DosReadMailslot
  7552.     AX = 5F50h
  7553.     BX = handle
  7554.     DX:CX = timeout
  7555.     ES:DI -> buffer
  7556. Return: CF clear if successful
  7557.         AX = bytes read
  7558.         CX = next item's size
  7559.         DX = next item's priority
  7560.     CF set on error
  7561.         AX = error code
  7562. SeeAlso: AX=5F4Dh,AX=5F4Fh,AX=5F51h,AX=5F52h
  7563. --------N-215F51-----------------------------
  7564. INT 21 u - LAN Manager Enhanced DOS - DosPeekMailslot
  7565.     AX = 5F51h
  7566.     BX = handle
  7567.     ES:DI -> buffer
  7568. Return: CF clear if successful
  7569.         AX = bytes read
  7570.         CX = next item's size
  7571.         DX = next item's priority
  7572.     CF set on error
  7573.         AX = error code
  7574. SeeAlso: AX=5F35h,AX=5F4Fh,AX=5F50h,AX=5F52h
  7575. --------N-215F52-----------------------------
  7576. INT 21 u - LAN Manager Enhanced DOS - DosWriteMailslot
  7577.     AX = 5F52h
  7578.     BX = class
  7579.     CX = length of buffer
  7580.     DX = priority
  7581.     ES:DI -> DosWriteMailslot parameter structure (see below)
  7582.     DS:SI -> mailslot name
  7583. Return: CF clear if successful
  7584.     CF set on error
  7585.         AX = error code
  7586. SeeAlso: AX=5F4Fh,AX=5F50h,AX=5F51h
  7587.  
  7588. Format of DosWriteMailslot parameter structure:
  7589. Offset    Size    Description
  7590.  00h    DWORD    timeout
  7591.  04h    DWORD    -> buffer
  7592. --------N-215F53-----------------------------
  7593. INT 21 u - LAN Manager Enhanced DOS - NetServerEnum2
  7594.     AX = 5F53h
  7595.     DS:SI -> NetServerEnum2 parameter structure (see below)
  7596. Return: CF clear if successful
  7597.         BX = entries read
  7598.         CX = total entries available
  7599.     CF set on error
  7600.         AX = error code
  7601. SeeAlso: AX=5F4Ch
  7602.  
  7603. Format of NetServerEnum2 parameter structure:
  7604. Offset    Size    Description
  7605.  00h    WORD    level (0000h or 0001h)
  7606.  02h    DWORD    -> buffer as array of server_info_??? structures
  7607.  06h    WORD    length of buffer
  7608.  08h    DWORD    server type bitmask (see below)
  7609.  0Ch    DWORD    -> Domain name (may be 0000h:0000h for all local domains)
  7610.  
  7611. Bitfields for server type:
  7612.  bit 0    workstation
  7613.  bit 1    server
  7614.  bit 2    SQL server
  7615.  bit 3    primary domain controller
  7616.  bit 4    backup domain controller
  7617.  bit 5    time server
  7618.  bit 6    Apple File Protocol (AFP) server
  7619.  bit 7    Novell server
  7620.  bit 8    Domain Member (v2.1+)
  7621.  bit 9    Print Queue server (v2.1+)
  7622.  bit 10 Dialin server (v2.1+)
  7623.  bit 11 Unix server (v2.1+)
  7624. Note:    set all bits (FFFFFFFFh) for All Types
  7625.  
  7626. Format of server_info_0 structure:
  7627. Offset    Size    Description
  7628.  00h 16 BYTEs    name
  7629.  
  7630. Format of server_info_1 structure:
  7631. Offset    Size    Description
  7632.  00h 16 BYTEs    name
  7633.  10h    BYTE    major version in lower nibble
  7634.  11h    BYTE    minor version
  7635.  12h    DWORD    server type (bits 0-11) (see above)
  7636.  16h    DWORD    -> comment string
  7637. --------N-215F55----------------------------
  7638. INT 21 U - LAN Manager Enhanced DOS - KILL ALL CONNECTIONS???
  7639.     AX = 5F55h
  7640.     BX = ???
  7641. Return: CF clear if successful
  7642.     CF set on error
  7643.         AX = error code
  7644. --------N-215F80-----------------------------
  7645. INT 21 - LANtastic - GET LOGIN ENTRY
  7646.     AX = 5F80h
  7647.     BX = login entry index (0-based)
  7648.     ES:DI -> 16-byte buffer for machine name
  7649. Return: CF clear if successful
  7650.         buffer filled with machine name ("\\" prefix removed)
  7651.         DL = adapter number (v3+)
  7652.     CF set on error
  7653.         AX = error code
  7654. Note:    the login entry index corresponds to the value BX used in AX=5F83h
  7655. SeeAlso: AX=5F83h
  7656. --------N-215F81-----------------------------
  7657. INT 21 - LANtastic - LOGIN TO SERVER
  7658.     AX = 5F81h
  7659.     ES:DI -> ASCIZ login path followed immediately by ASCIZ password
  7660.     BL = adapter number
  7661.         FFh try all valid adapters
  7662.         00h-07h try only specified adapter
  7663. Return: CF clear if successful
  7664.     CF set on error
  7665.         AX = error code
  7666. Notes:    login path is of form "\\machine\username"
  7667.     if no password is used, the string at ES:DI must be terminated with
  7668.       three NULs for compatibility with LANtastic v3.0.
  7669. SeeAlso: AX=5F82h,AX=5F84h
  7670. --------N-215F82-----------------------------
  7671. INT 21 - LANtastic - LOGOUT FROM SERVER
  7672.     AX = 5F82h
  7673.     ES:DI -> ASCIZ server name (in form "\\machine")
  7674. Return: CF clear if successful
  7675.     CF set on error
  7676.         AX = error code
  7677. SeeAlso: AX=5F81h,AX=5F88h,AX=5FCBh
  7678. --------N-215F83-----------------------------
  7679. INT 21 - LANtastic - GET USERNAME ENTRY
  7680.     AX = 5F83h
  7681.     BX = login entry index (0-based)
  7682.     ES:DI -> 16-byte buffer for username currently logged into
  7683. Return: CF clear if successful
  7684.         DL = adapter number (v3+)
  7685.     CF set on error
  7686.         AX = error code
  7687. Note:    the login entry index corresponds to the value BX used in AX=5F80h
  7688. SeeAlso: AX=5F80h
  7689. --------N-215F84-----------------------------
  7690. INT 21 - LANtastic - GET INACTIVE SERVER ENTRY
  7691.     AX = 5F84h
  7692.     BX = server index not currently logged into
  7693.     ES:DI -> 16-byte buffer for server name which is available for logging
  7694.         in to ("\\" prefix omitted)
  7695. Return: CF clear if successful
  7696.         DL = adapter number to non-logged in server is on
  7697.     CF set on error
  7698.         AX = error code
  7699. SeeAlso: AX=5F81h
  7700. --------N-215F85-----------------------------
  7701. INT 21 - LANtastic - CHANGE PASSWORD
  7702.     AX = 5F85h
  7703.     ES:DI -> buffer containing "\\machine\oldpassword" 00h "newpassword"00h
  7704. Return: CF clear if successful
  7705.     CF set on error
  7706.         AX = error code
  7707. Notes:    must be logged into the named machine
  7708.     this function is illegal for group accounts
  7709. --------N-215F86-----------------------------
  7710. INT 21 - LANtastic - DISABLE ACCOUNT
  7711.     AX = 5F86h
  7712.     ES:DI -> ASCIZ machine name and password in form "\\machine\password"
  7713. Return: CF clear if successful
  7714.     CF set on error
  7715.         AX = error code
  7716. Note:    must be logged into the named machine and concurrent logins set to 1
  7717.       by NET_MGR.  Requires system manager to re-enable account.
  7718. --------N-215F87-----------------------------
  7719. INT 21 - LANtastic v3+ - GET ACCOUNT
  7720.     AX = 5F87h
  7721.     DS:SI -> 128-byte buffer for account information (see below)
  7722.     ES:DI -> ASCIZ machine name in form "\\machine"
  7723. Return: CF clear if successful
  7724.     CF set on error
  7725.         AX = error code
  7726.     BX destroyed
  7727. Note:    must be logged into the specified machine
  7728.  
  7729. Format of user account structure:
  7730. Offset    Size    Description
  7731.  00h 16 BYTEs    blank-padded username (zero-padded for v4.x)
  7732.  10h 16 BYTEs    reserved (00h)
  7733.  20h 32 BYTEs    user description
  7734.  40h    BYTE    privilege bits (see below)
  7735.  41h    BYTE    maximum concurrent users
  7736.  42h 42 BYTEs    bit map for disallowed half hours, beginning on Sunday
  7737.         (bit set if half-hour not an allowed time)
  7738.  6Ch    WORD    internal (0002h)
  7739.  6Eh  2 WORDs    last login time
  7740.  72h  2 WORDs    account expiration date (MS-DOS-format year/month:day)
  7741.  76h  2 WORDs    password expiration date (0 = none)
  7742.  7Ah    BYTE    number of days to extend password after change (1-31)
  7743.         00h if no extension required
  7744. ---v3.x---
  7745.  7Bh  5 BYTEs    reserved
  7746. ---v4.x---
  7747.  7Bh    BYTE    storage for first letter of user name when deleted (first
  7748.         character is changed to 00h when deleting account)
  7749.  7Ch    BYTE    extended privileges
  7750.  7Dh  3 BYTEs    reserved
  7751.  
  7752. Bitfields for privilege bits:
  7753.  bit 7    bypass access control lists
  7754.  bit 6    bypass queue protection
  7755.  bit 5    treat as local process
  7756.  bit 4    bypass mail protection
  7757.  bit 3    allow audit entry creation
  7758.  bit 2    system manager
  7759.  bit 0    user cannot change password
  7760. --------N-215F88-----------------------------
  7761. INT 21 - LANtastic v4.0+ - LOGOUT FROM ALL SERVERS
  7762.     AX = 5F88h
  7763. Return: CF clear if successful
  7764.     CF set on error
  7765.         AX = error code
  7766. SeeAlso: AX=5F82h
  7767. --------N-215F97-----------------------------
  7768. INT 21 - LANtastic - COPY FILE
  7769.     AX = 5F97h
  7770.     CX:DX = number of bytes to copy (FFFFFFFFh = entire file)
  7771.     SI = source file handle
  7772.     DI = destination file handle
  7773. Return: CF clear if successful
  7774.         DX:AX = number of bytes copied
  7775.     CF set on error
  7776.         AX = error code
  7777. Note:    copy is performed by server
  7778. --------N-215F98-----------------------------
  7779. INT 21 - LANtastic - SEND UNSOLICITED MESSAGE
  7780.     AX = 5F98h
  7781.     DS:SI -> message buffer (see below)
  7782. Return: CF clear if successful
  7783.     CF set on error
  7784.         AX = error code
  7785. Note:    v4.1- return no errors
  7786. SeeAlso: AX=5F99h
  7787.  
  7788. Format of message buffer:
  7789. Offset    Size    Description
  7790.  00h    BYTE    reserved
  7791.  01h    BYTE    message type
  7792.         00h general
  7793.         01h server warning
  7794.         02h-7Fh reserved
  7795.         80h-FFh user-defined
  7796.  02h 16 BYTEs    ASCIZ destination machine name
  7797.  12h 16 BYTEs    ASCIZ server name which user must be logged into
  7798.  22h 16 BYTEs    ASCIZ user name
  7799.  32h 16 BYTEs    ASCIZ originating machine name (filled in when received)
  7800.  42h 80 BYTEs    message text
  7801. --------N-215F99-----------------------------
  7802. INT 21 - LANtastic - GET LAST RECEIVED UNSOLICITED MESSAGE
  7803.     AX = 5F99h
  7804.     ES:DI -> messsage buffer (see AX=5F98h for format)
  7805. Return: CF clear if successful
  7806.     CF set on error
  7807.         AX = error code
  7808. SeeAlso: AX=5F98h
  7809. --------N-215F9A-----------------------------
  7810. INT 21 - LANtastic - GET MESSAGE PROCESSING FLAGS
  7811.     AX = 5F9Ah
  7812. Return: CF clear if successful
  7813.         DL = bits describing processing for received unsolicited messages
  7814.         bit 0: beep before message is delivered
  7815.         bit 1: deliver message to message service
  7816.         bit 2: pop up message automatically (v3+)
  7817.     CF set on error
  7818.         AX = error code
  7819. SeeAlso: AX=5F9Bh,AX=5F9Ch,AX=5F9Dh
  7820. --------N-215F9B-----------------------------
  7821. INT 21 - LANtastic - SET MESSAGE PROCESSING FLAG
  7822.     AX = 5F9Bh
  7823.     DL = bits describing processing for received unsolicited messages
  7824.          (see AX=5F9Ah)
  7825. Return: CF clear if successful
  7826.     CF set on error
  7827.         AX = error code
  7828. SeeAlso: AX=5F9Ah,AX=5F9Eh
  7829. --------N-215F9C-----------------------------
  7830. INT 21 - LANtastic v3+ - POP UP LAST RECEIVED MESSAGE
  7831.     AX = 5F9Ch
  7832.     CX = time to leave on screen in clock ticks
  7833.     DH = 0-based screen line on which to place message
  7834. Return: CF clear if successful
  7835.     CF set on error
  7836.         AX = error code (0Bh)
  7837. Notes:    the original screen contents are restored when the message is removed
  7838.     the message will not appear, and an error will be returned, if the
  7839.       screen is in a graphics mode
  7840. SeeAlso: AX=5F9Ah
  7841. --------N-215F9D-----------------------------
  7842. INT 21 - LANtastic v4.1+ - GET REDIRECTOR CONTROL BITS
  7843.     AX = 5F9Dh
  7844. Return: DL = redirector control bits
  7845.         bit 7: set to notify on print job completion
  7846. SeeAlso: AX=5F9Ah,AX=5F9Eh
  7847. --------N-215F9E-----------------------------
  7848. INT 21 - LANtastic v4.1+ - SET REDIRECTOR CONTROL BITS
  7849.     AX = 5F9Eh
  7850.     DL = redirector control bits (see AH = 5F9Dh)
  7851. Return: nothing
  7852. SeeAlso: AX=5F9Bh,AX=5F9Dh
  7853. --------N-215FA0-----------------------------
  7854. INT 21 - LANtastic - GET QUEUE ENTRY
  7855.     AX = 5FA0h
  7856.     BX = queue entry index (0000h is first entry)
  7857.     DS:SI -> buffer for queue entry (see below)
  7858.     ES:DI -> ASCIZ server name in form "\\name"
  7859. Return: CF clear if successful
  7860.     CF set on error
  7861.         AX = error code
  7862.     BX = entry index for next queue entry (BX-1 is current index)
  7863. SeeAlso: AX=5FA1h,AX=5FA2h
  7864.  
  7865. Values for status of entry:
  7866.  00h    empty
  7867.  01h    being updated
  7868.  02h    being held
  7869.  03h    waiting for despool
  7870.  04h    being despooled
  7871.  05h    canceled
  7872.  06h    spooled file could not be accessed
  7873.  07h    destination could not be accessed
  7874.  08h    rush job
  7875.  
  7876. Values for type of entry:
  7877.  00h    printer queue file
  7878.  01h    message
  7879.  02h    local file
  7880.  03h    remote file
  7881.  04h    to remote modem
  7882.  05h    batch processor file
  7883.  
  7884. Format of queue entry:
  7885. Offset    Size    Description
  7886.  00h    BYTE    status of entry (see above)
  7887.  01h    DWORD    size of spooled file
  7888.  05h    BYTE    type of entry (see above)
  7889.  06h    BYTE    output control
  7890.         bit 6: don't delete (for mail)
  7891.         bit 5: mail file contains voice mail (v3+)
  7892.         bit 4: mail message has been read
  7893.         bit 3: response has been requested for this mail
  7894.  07h    WORD    number of copies
  7895.  09h    DWORD    sequence number of queue entry
  7896.  0Dh 48 BYTEs    pathname of spooled file
  7897.  3Dh 16 BYTEs    user who spooled file
  7898.  4Dh 16 BYTEs    name of machine from which file was spooled
  7899.  5Dh    WORD    date file was spooled (see AX=5700h)
  7900.  5Fh    WORD    time file was spooled (see AX=5700h)
  7901.  61h 17 BYTEs    ASCIZ destination device or user name
  7902.  72h 48 BYTEs    comment field
  7903. --------N-215FA1-----------------------------
  7904. INT 21 - LANtastic - SET QUEUE ENTRY
  7905.     AX = 5FA1h
  7906.     BX = handle of opened queue entry
  7907.     DS:SI -> queue entry (see AX=5FA0h)
  7908. Return: CF clear if successful
  7909.     CF set on error
  7910.         AX = error code
  7911. Notes:    the only queue entry fields which may be changed are output control,
  7912.       number of copies, destination device, and comment
  7913.     the handle in BX is that from a create or open (INT 21/AH=3Ch,3Dh)
  7914.       call on the file "\\server\\@MAIL" or "\\server\@name" (for
  7915.       printer queue entries)
  7916. SeeAlso: AX=5FA0h,AX=5FA2h,AX=5FA9h
  7917. --------N-215FA2-----------------------------
  7918. INT 21 - LANtastic - CONTROL QUEUE
  7919.     AX = 5FA2h
  7920.     BL = control command
  7921.         00h start despooling (privileged)
  7922.         01h halt despooling (privileged)
  7923.         02h halt despooling at end of job (privileged)
  7924.         03h pause despooler at end of job (privileged)
  7925.         04h print single job (privileged)
  7926.         05h restart current job (privileged)
  7927.         06h cancel the current job
  7928.         07h hold queue entry
  7929.         08h release a held queue entry
  7930.         09h make queue entry a rushed job (privileged)
  7931.     CX:DX = sequence number to control (commands 06h-09h)
  7932.     DX = physical printer number (commands 00h-05h)
  7933.         00h-02h LPT1-LPT3
  7934.         03h,04h COM1,COM2
  7935.         other    all printers
  7936.     ES:DI -> ASCIZ server name in form "\\machine"
  7937. Return: CF clear if successful
  7938.     CF set on error
  7939.         AX = error code
  7940. --------N-215FA3-----------------------------
  7941. INT 21 - LANtastic v3+ - GET PRINTER STATUS
  7942.     AX = 5FA3h
  7943.     BX = physical printer number (00h-02h = LPT1-LPT3, 03h-04h = COM1-COM2)
  7944.     DS:SI -> buffer for printer status (see below)
  7945.     ES:DI -> ASCIZ server name in form "\\machine"
  7946. Return: CF clear if successful
  7947.     CF set on error
  7948.         AX = error code
  7949.     BX = next physical printer number
  7950. Note:    you must be logged in to the specified server
  7951.  
  7952. Format of printer status:
  7953. Offset    Size    Description
  7954.  00h    BYTE    printer state
  7955.         bit 7: printer paused
  7956.         bits 0-6: 0 printer disabled
  7957.               1 will stop at end of job
  7958.               2 print multiple jobs
  7959.  01h    WORD    queue index of print job being despooled
  7960.         FFFFh if not despooling--ignore all following fields
  7961.  03h    WORD    actual characters per second being output
  7962.  05h    DWORD    number of characters actually output so far
  7963.  09h    DWORD    number of bytes read from spooled file so far
  7964.  0Dh    WORD    copies remaining to print
  7965. --------N-215FA4-----------------------------
  7966. INT 21 - LANtastic v3+ - GET STREAM INFO
  7967.     AX = 5FA4h
  7968.     BX = 0-based stream index number
  7969.     DS:SI -> buffer for stream information (see below)
  7970.     ES:DI -> ASCIZ machine name in form "\\machine"
  7971. Return: CF clear if successful
  7972.     CF set on error
  7973.         AX = error code
  7974.     BX = next stream number
  7975. SeeAlso: AX=5FA5h
  7976.  
  7977. Format of stream information:
  7978. Offset    Size    Description
  7979.  00h    BYTE    queueing of jobs for logical printer (0=disabled,other=enabled)
  7980.  01h 11 BYTEs    logical printer resource template (may contain ? wildcards)
  7981. --------N-215FA5-----------------------------
  7982. INT 21 - LANtastic v3+ - SET STREAM INFO
  7983.     AX = 5FA5h
  7984.     BX = 0-based stream index number
  7985.     DS:SI -> buffer containing stream information (see AX=5FA4h)
  7986.     ES:DI -> ASCIZ machine name in form "\\machine"
  7987. Return: CF clear if successful
  7988.     CF set on error
  7989.         AX = error code
  7990. SeeAlso: AX=5FA4h
  7991. --------N-215FA7-----------------------------
  7992. INT 21 - LANtastic - CREATE USER AUDIT ENTRY
  7993.     AX = 5FA7h
  7994.     DS:DX -> ASCIZ reason code (max 8 bytes)
  7995.     DS:SI -> ASCIZ variable reason string (max 128 bytes)
  7996.     ES:DI -> ASCIZ machine name in form "\\machine"
  7997. Return: CF clear if successful
  7998.     CF set on error
  7999.         AX = error code
  8000. Note:    you must be logged in to the specified server and have the "U"
  8001.       privilege to execute this call
  8002. --------N-215FA9-----------------------------
  8003. INT 21 - LANtastic v4.1+ - SET EXTENDED QUEUE ENTRY
  8004.     AX = 5FA9h
  8005.     BX = handle of opened queue entry
  8006.     DS:SI -> queue entry (see AX=5FA0h)
  8007. Return: CF clear if successful
  8008.     CF set on error
  8009.         AX = error code
  8010. Note:    functions exactly the same as AX=5FA1h except the spooled filename is
  8011.       also set.  This call supports direct despooling.
  8012. SeeAlso: AX=5FA1h
  8013. --------N-215FB0-----------------------------
  8014. INT 21 - LANtastic - GET ACTIVE USER INFORMATION
  8015.     AX = 5FB0h
  8016.     BX = server login entry index
  8017.     DS:SI -> buffer for active user entry (see below)
  8018.     ES:DI -> ASCIZ machine name in form "\\server"
  8019. Return: CF clear if successful
  8020.     CF set on error
  8021.         AX = error code
  8022.     BX = next login index
  8023. SeeAlso: AX=5FB2h
  8024.  
  8025. Format of active user entry:
  8026. Offset    Size    Description
  8027.  00h    WORD    virtual circuit number
  8028.  02h    BYTE    login state (see below)
  8029.  03h    BYTE    last command issued (see below)
  8030.  04h  5 BYTEs    number of I/O bytes (40-bit unsigned number)
  8031.  09h  3 BYTEs    number of server requests (24-bit unsigned)
  8032.  0Ch 16 BYTEs    name of user who is logged in
  8033.  1Ch 16 BYTEs    name of remote logged in machine
  8034.  2Ch    BYTE    extended privileges (v4+???)
  8035.         bit 0: user cannot change his password
  8036.  2Dh    WORD    time left in minutes (0000h = unlimited) (v4+???)
  8037.  
  8038. Bitfields for login state:
  8039.  bit 0    fully logged in
  8040.  bit 1    remote program load login
  8041.  bit 2    user has system manager privileges
  8042.  bit 3    user can create audit entries
  8043.  bit 4    bypass mail protection
  8044.  bit 5    treat as local process
  8045.  bit 6    bypass queue protection
  8046.  bit 7    bypass access control lists
  8047.  
  8048. Values for last command:
  8049.  00h    login
  8050.  01h    process termination
  8051.  02h    open file
  8052.  03h    close file
  8053.  04h    create file
  8054.  05h    create new file
  8055.  06h    create unique file
  8056.  07h    commit data to disk
  8057.  08h    read file
  8058.  09h    write file
  8059.  0Ah    delete file
  8060.  0Bh    set file attributes
  8061.  0Ch    lock byte range
  8062.  0Dh    unlock byte range
  8063.  0Eh    create subdirectory
  8064.  0Fh    remove subdirectory
  8065.  10h    rename file
  8066.  11h    find first matching file
  8067.  12h    find next matching file
  8068.  13h    get disk free space
  8069.  14h    get a queue entry
  8070.  15h    set a queue entry
  8071.  16h    control the queue
  8072.  17h    return login information
  8073.  18h    return link description
  8074.  19h    seek on file
  8075.  1Ah    get server's time
  8076.  1Bh    create audit entry
  8077.  1Ch    open file in multitude of modes
  8078.  1Dh    change password
  8079.  1Eh    disable account
  8080.  1Fh    local server file copy
  8081. ---v3+---
  8082.  20h    get username from account file
  8083.  21h    translate server's logical path
  8084.  22h    make indirect file
  8085.  23h    get indirect file contents
  8086.  24h    get physical printer status
  8087.  25h    get logical print stream info
  8088.  26h    set logical print stream info
  8089.  27h    get user's account record
  8090. ---v4+---
  8091.  28h    request server shutdown
  8092.  29h    cancel server shutdown
  8093.  2Ah    stuff server's keyboard
  8094.  2Bh    write then commit data to disk
  8095.  2Ch    set extended queue entry
  8096.  2Dh    terminate user from server
  8097.  2Eh    enable/disable logins
  8098.  2Fh    flush server caches
  8099.  30h    change username
  8100.  31h    get extended queue entry
  8101.     (same as get queue, but can return named fields blanked)
  8102. --------N-215FB1-----------------------------
  8103. INT 21 - LANtastic - GET SHARED DIRECTORY INFORMATION
  8104.     AX = 5FB1h
  8105.     DS:SI -> 64-byte buffer for link description
  8106.     ES:DI -> ASCIZ machine and shared directory name in form
  8107.          "\\machine\shared-resource"
  8108. Return: CF clear if successful
  8109.         CX = access control list privileges for requesting user (see below)
  8110.     CF set on error
  8111.         AX = error code
  8112.  
  8113. Bitfields for access control list:
  8114.  bit 4    (I) allow expansion of indirect files
  8115.  bit 5    (A) allow attribute changing
  8116.  bit 6    (P) allow physical access to device
  8117.  bit 7    (E) allow program execution
  8118.  bit 8    (N) allow file renaming
  8119.  bit 9    (K) allow directory deletion
  8120.  bit 10 (D) allow file deletion
  8121.  bit 11 (L) allow file/directory lookups
  8122.  bit 12 (M) allow directory creation
  8123.  bit 13 (C) allow file creation
  8124.  bit 14 (W) allow open for write and writing
  8125.  bit 15 (R) allow open for read and reading
  8126. --------N-215FB2-----------------------------
  8127. INT 21 - LANtastic v3+ - GET USERNAME FROM ACCOUNT FILE
  8128.     AX = 5FB2h
  8129.     BX = username entry index (0 for first)
  8130.     DS:SI -> 16-byte buffer for username
  8131.     ES:DI -> ASCIZ server name in form "\\machine"
  8132. Return: CF clear if successful
  8133.     CF set on error
  8134.         AX = error code
  8135.     BX = next queue entry index
  8136. SeeAlso: AX=5FB0h
  8137. --------N-215FB3-----------------------------
  8138. INT 21 - LANtastic v3+ - TRANSLATE PATH
  8139.     AX = 5FB3h
  8140.     DS:SI -> 128-byte buffer for ASCIZ result
  8141.     ES:DI -> full ASCIZ path, including server name
  8142.     DX = types of translation to be performed
  8143.         bit 0: expand last component as indirect file
  8144.         bit 1: return actual path relative to server's physical disk
  8145. Return: CF clear if successful
  8146.     CF set on error
  8147.         AX = error code
  8148. Note:    always expands any indirect files along the path
  8149. SeeALso: AX=5FB4h,INT 21/AH=60h
  8150. --------N-215FB4-----------------------------
  8151. INT 21 - LANtastic v3+ - CREATE INDIRECT FILE
  8152.     AX = 5FB4h
  8153.     DS:SI -> 128-byte buffer containing ASCIZ contents of indirect file
  8154.     ES:DI -> full ASCIZ path of indirect file to create, incl machine name
  8155. Return: CF clear if successful
  8156.     CF set on error
  8157.         AX = error code
  8158. Note:    the contents of the indirect file may be any valid server-relative path
  8159. SeeAlso: AX=5FB3h,AX=5FB5h
  8160. --------N-215FB5-----------------------------
  8161. INT 21 - LANtastic v3+ - GET INDIRECT FILE CONTENTS
  8162.     AX = 5FB5h
  8163.     DS:SI -> 128-byte buffer for ASCIZ indirect file contents
  8164.     ES:DI -> full ASCIZ path of indirect file
  8165. Return: CF clear if successful
  8166.     CF set on error
  8167.         AX = error code
  8168. SeeAlso: AX=5FB4h
  8169. --------N-215FB6-----------------------------
  8170. INT 21 - LANtastic v4.1+ - SET AUTO-LOGIN DEFAULTS
  8171.     AX = 5FB6h
  8172.     ES:DI -> pointer to ASCIZ default user name, immediately followed by
  8173.         ASCIZ password
  8174.     BL = adapter number to use for default login attempt
  8175.         FFh try all valid adapters
  8176.         00h-05h try adapter 0-5 explicitly
  8177. Return: CF clear if successful
  8178.     CF set on error
  8179.         AX = error code
  8180. Notes:    call with ES:DI -> two nulls to disable auto-login
  8181. SeeAlso: AX=5FB7h
  8182. --------N-215FB7-----------------------------
  8183. INT 21 - LANtastic v4.1+ - GET AUTO-LOGIN DEFAULTS
  8184.     AX = 5FB7h
  8185.     ES:DI -> pointer to 16-byte buffer to store ASCIZ auto-login user name
  8186. Return: CF clear if successful
  8187.         DL = adapter number used for default login attempt
  8188.         FFh all valid adapters will be tried
  8189.         00h-05h specified adapter will be tried explicitly
  8190.     CF set on error
  8191.         AX = error code
  8192. SeeAlso: AX=5F81h,AX=5FB6h
  8193. --------N-215FC0-----------------------------
  8194. INT 21 - LANtastic - GET TIME FROM SERVER
  8195.     AX = 5FC0h
  8196.     DS:SI -> time block (see below)
  8197.     ES:DI -> ASCIZ server name to get time from
  8198. Return: CF clear if successful
  8199.     CF set on error
  8200.         AX = error code
  8201. SeeAlso: AH=E7h
  8202.  
  8203. Format of time block:
  8204. Offset    Size    Description
  8205.  00h    WORD    year
  8206.  02h    BYTE    day
  8207.  03h    BYTE    month
  8208.  04h    BYTE    minutes
  8209.  05h    BYTE    hour
  8210.  06h    BYTE    hundredths of second
  8211.  07h    BYTE    second
  8212. --------N-215FC8-----------------------------
  8213. INT 21 - LANtastic v4.0+ - SCHEDULE SERVER SHUTDOWN
  8214.     AX = 5FC8h
  8215.     ES:DI -> ASCIZ server name in form "\\machine"
  8216.     DS:SI -> ASCIZ reason string (80 characters)
  8217.     CX = number of minutes until shutdown (0 = immediate)
  8218.     DX = option flags (see below)
  8219. Return: CF clear if successful
  8220.     CF set on error
  8221.         AX = error code
  8222. SeeAlso: AX=5FC9h
  8223.  
  8224. Bitfields for option flags:
  8225.  bit 0    auto reboot
  8226.  bit 1    do not notify users
  8227.  bit 2    halt after shutdown
  8228.  bit 3    shutdown due to power fail (used by UPS)
  8229.  bits 4-7    reserved
  8230.  bits 8-14    user definable
  8231.  bit 15 reserved
  8232. --------N-215FC9-----------------------------
  8233. INT 21 - LANtastic v4.0+ - CANCEL SERVER SHUTDOWN
  8234.     AX = 5FC9h
  8235.     ES:DI -> ASCIZ server name in form "\\machine"
  8236. Return: CF clear if successful
  8237.     CF set on error
  8238.         AX = error code
  8239. Note:    you must have the "S" privilege to use this call
  8240. SeeAlso: AX=5FC8h
  8241. --------N-215FCA-----------------------------
  8242. INT 21 - LANtastic v4.0+ - STUFF SERVER KEYBOARD BUFFER
  8243.     AX = 5FCAh
  8244.     ES:DI -> ASCIZ server name in form "\\machine"
  8245.     DS:SI -> ASCIZ string to stuff (128 bytes)
  8246. Return: CF clear if successful
  8247.     CF set on error
  8248.         AX = error code
  8249. Note:    you must have the "S" privilege to use this call
  8250.     maximum number of characters that can be stuffed is determined by the
  8251.       server's RUN BUFFER SIZE.
  8252. SeeAlso: INT 16/AH=05h
  8253. --------N-215FCB-----------------------------
  8254. INT 21 - LANtastic v4.1+ - TERMINATE USER
  8255.     AX = 5FCBh
  8256.     ES:DI -> ASCIZ server name in form "\\machine"
  8257.     DS:SI -> blank-padded username.     A null char = wildcard.
  8258.     DS:DX -> blank-padded machine name.  A null char = wildcard.
  8259.     CX = minutes until termination (0 = immediate)
  8260. Return: CF clear if successful
  8261.     CF set on error
  8262.         AX = error code
  8263. Note:    you must have the "S" privilege to use this call
  8264.     you cannot log yourself out using this call
  8265. SeeAlso: AX=5F82h
  8266. --------N-215FCC-----------------------------
  8267. INT 21 - LANtastic v4.1+ - GET/SET SERVER CONTROL BITS
  8268.     AX = 5FCCh
  8269.     ES:DI -> ASCIZ server name in form "\\machine"
  8270.     CX = bit values (value of bits you want to set) (see below)
  8271.     DX = bit mask (bits you are interested in, 0 = get only) (see below)
  8272. Return: CF clear if successful
  8273.         CX = control bits after call
  8274.         bit 0: disable logins
  8275.     CF set on error
  8276.         AX = error code
  8277. Note:    you must have the "S" privilege to SET, anyone can GET.
  8278. --------N-215FCD-----------------------------
  8279. INT 21 - LANtastic v4.1+ - FLUSH SERVER CACHES
  8280.     AX = 5FCDh
  8281.     ES:DI -> ASCIZ server name in form "\\machine"
  8282. Return: CF clear if successful
  8283.     CF set on error
  8284.         AX = error code
  8285. Note:    you must have the "S" privilege to use this call.
  8286. --------N-215FD0-----------------------------
  8287. INT 21 - LANtastic - GET REDIRECTED PRINTER TIMEOUT
  8288.     AX = 5FD0h
  8289. Return: CF clear if successful
  8290.         CX = redirected printer timeout in clock ticks of 55ms
  8291.         0000h if timeout disabled
  8292.     CF set on error
  8293.         AX = error code
  8294. SeeAlso: AX=5FD1h
  8295. --------N-215FD1-----------------------------
  8296. INT 21 - LANtastic - SET REDIRECTED PRINTER TIMEOUT
  8297.     AX = 5FD1h
  8298.     CX = printer timeout in clock ticks of 55ms, 0000h to disable timeouts
  8299. Return: CF clear if successful
  8300.     CF set on error
  8301.         AX = error code
  8302. SeeAlso: AX=5FD0h
  8303. --------N-215FE0-----------------------------
  8304. INT 21 C - LANtastic - GET DOS SERVICE VECTOR
  8305.     AX = 5FE0h
  8306. Return: CF clear if successful
  8307.         ES:BX -> current FAR service routine
  8308.     CF set on error
  8309.         AX = error code
  8310. Note:    the service routine is called by the LANtastic redirector whenever DOS
  8311.       may safely be called, permitting external TSRs and drivers to hook
  8312.       into LANtastic's DOS busy flag checking
  8313. SeeAlso: AX=5FE1h,INT 28,INT 2A/AH=84h
  8314. --------N-215FE1-----------------------------
  8315. INT 21 - LANtastic - SET DOS SERVICE VECTOR
  8316.     AX = 5FE1h
  8317.     ES:BX -> FAR routine to call when DOS services are available
  8318. Return: CF clear if successful
  8319.     CF set on error
  8320.         AX = error code
  8321. Note:    new handler must chain to previous handler as its first action
  8322. SeeAlso: AX=5FE0h
  8323. --------N-215FE2-----------------------------
  8324. INT 21 - LANtastic - GET MESSAGE SERVICE VECTOR
  8325.     AX = 5FE2h
  8326. Return: CF clear if successful
  8327.         ES:BX -> current FAR message service routine
  8328.     CF set on error
  8329.         AX = error code
  8330. SeeAlso: AX=5FE0h,AX=5FE3h
  8331. --------N-215FE3-----------------------------
  8332. INT 21 - LANtastic - SET MESSAGE SERVICE VECTOR
  8333.     AX = 5FE3h
  8334.     ES:BX -> FAR routine for processing network messages
  8335. Return: CF clear if successful
  8336.     CF set on error
  8337.         AX = error code
  8338. Notes:    handler must chain to previous handler as its first action
  8339.     on invocation, ES:BX -> just-received message
  8340. SeeAlso: AX=5FE2h
  8341. --------D-2160-------------------------------
  8342. INT 21 - DOS 3.0+ - "TRUENAME" - CANONICALIZE FILENAME OR PATH
  8343.     AH = 60h
  8344.     DS:SI -> ASCIZ filename or path
  8345.     ES:DI -> 128-byte buffer for canonicalized name
  8346. Return: CF set on error
  8347.         AX = error code
  8348.         02h invalid component in directory path or drive letter only
  8349.         03h malformed path or invalid drive letter
  8350.         ES:DI buffer unchanged
  8351.     CF clear if successful
  8352.         AH = 00h
  8353.         AL = destroyed (00h or 5Ch or last char of current dir on drive)
  8354.         buffer filled with qualified name of form D:\PATH\FILE.EXT or
  8355.           \\MACHINE\PATH\FILE.EXT
  8356. Desc:    determine the canonical name of the specified filename or path,
  8357.       corresponding to the undocumented TRUENAME command in COMMAND.COM
  8358. Notes:    the input path need not actually exist
  8359.     letters are uppercased, forward slashes converted to backslashes,
  8360.       asterisks converted to appropriate number of question marks, and
  8361.       file and directory names are truncated to 8.3 if necessary.  (DR-DOS
  8362.       3.41 and 5.0 do not expand asterisks)
  8363.     '.' and '..' in the path are resolved
  8364.     filespecs on local drives always start with "d:", those on network
  8365.       drives always start with "\\"
  8366.     if path string is on a JOINed drive, the returned name is the one that
  8367.       would be needed if the drive were not JOINed; similarly for a
  8368.       SUBSTed, ASSIGNed, or network drive letter.    Because of this, it is
  8369.       possible to get a qualified name that is not legal under the current
  8370.       combination of SUBSTs, ASSIGNs, JOINs, and network redirections
  8371.     under DOS 3.3 through 6.00, a device name is translated differently if
  8372.       the device name does not have an explicit directory or the directory
  8373.       is \DEV (relative directory DEV from the root directory works
  8374.       correctly).  In these cases, the returned string consists of the
  8375.       unchanged device name and extension appended to the string X:/
  8376.       (forward slash instead of backward slash as in all other cases) where
  8377.       X is the default or explicit drive letter.
  8378.     functions which take pathnames require canonical paths if invoked via
  8379.       INT 21/AX=5D00h
  8380.     supported by OS/2 v1.1 compatibility box
  8381.     NetWare 2.1x does not support characters with the high bit set; early
  8382.       versions of NetWare 386 support such characters except in this call.
  8383.       In addition, NetWare returns error code 3 for the path "X:\"; one
  8384.       should use "X:\." instead.
  8385.     for DOS 3.3-6.0, the input and output buffers may be the same, as the
  8386.       canonicalized name is built in an internal buffer and copied to the
  8387.       specified output buffer as the very last step
  8388.     for DR DOS 6.0, this function is not automatically called when on a
  8389.       network.  Device drivers reportedly cannot make this call from their
  8390.       INIT function.  Using the same pointer for both input and output
  8391.       buffers is not supported in the April 1992 and earlier versions of
  8392.       DR DOS
  8393. SeeAlso: AX=5FB3h,INT 2F/AX=1123h,INT 2F/AX=1221h
  8394. --------D-2161-------------------------------
  8395. INT 21 - DOS 3+ - UNUSED
  8396.     AH = 61h
  8397. Return: AL = 00h
  8398. Note:    this function does nothing and returns immediately
  8399. --------O-2161--BP6467-----------------------
  8400. INT 21 U - OS/2 v1.x FAPI - OS/2 FILE SYSTEM JOIN/SUBST
  8401.     AH = 61h
  8402.     BP = 6467h ("dg")
  8403.     AL = function
  8404.         00h list
  8405.         01h add
  8406.         02h delete
  8407.     BX = drive number
  8408.     CX = size of buffer
  8409.     SI = type (0002h JOIN, 0003h SUBST)
  8410.     ES:DI -> buffer
  8411. Return: ???
  8412. Notes:    used by JOIN and SUBST to communicate with the OS/2 file system
  8413.     also supported by OS/2 v2.0+ Virtual DOS Machines
  8414. --------D-2162-------------------------------
  8415. INT 21 - DOS 3+ - GET CURRENT PSP ADDRESS
  8416.     AH = 62h
  8417. Return: BX = segment of PSP for current process
  8418. Notes:    under DOS 3+, this function does not use any of the DOS-internal stacks
  8419.       and may thus be called at any time, even during another INT 21h call
  8420.     the current PSP is not necessarily the caller's PSP
  8421.     identical to the undocumented AH=51h
  8422. SeeAlso: AH=50h,AH=51h
  8423. --------D-216300-----------------------------
  8424. INT 21 - DOS 2.25 only - GET LEAD BYTE TABLE ADDRESS
  8425.     AX = 6300h
  8426. Return: CF clear if successful
  8427.         DS:SI -> lead byte table (see below)
  8428.     CF set on error
  8429.         AX = error code (01h) (see AH=59h)
  8430. Notes:    does not preserve any registers other than SS:SP
  8431.     the US version of MS-DOS 3.30 treats this as an unused function,
  8432.       setting AL=00h and returning immediately
  8433. SeeAlso: AX=6301h,AH=07h,AH=08h,AH=0Bh
  8434.  
  8435. Format of lead byte table entry:
  8436. Offset    Size    Description
  8437.  00h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  8438.  02h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  8439.     ...
  8440.   N   2 BYTEs    00h,00h end flag
  8441. --------D-216300-----------------------------
  8442. INT 21 - Far East DOS 3.2+ - GET DOUBLE BYTE CHARACTER SET LEAD-BYTE TABLE
  8443.     AX = 6300h
  8444. Return: AL = error code
  8445.         00h successful
  8446.         DS:SI -> DBCS table (see below)
  8447.         all other registers except CS:IP and SS:SP destroyed
  8448.         FFh not supported
  8449. Notes:    probably identical to AH=63h/AL=00h for DOS 2.25
  8450.     the US version of MS-DOS 3.30 treats this as an unused function,
  8451.       setting AL=00h and returning immediately
  8452.     the US version of DOS 4.0+ accepts this function, but returns an empty
  8453.       list
  8454. SeeAlso: AX=6300h"DOS 2.25"
  8455.  
  8456. Format of DBCS table:
  8457. Offset    Size    Description
  8458.  00h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  8459.  02h  2 BYTEs    low/high ends of a range of leading byte of double-byte chars
  8460.     ...
  8461.   N   2 BYTEs    00h,00h end flag
  8462. --------D-216301-----------------------------
  8463. INT 21 - DOS 2.25, Far East DOS 3.2+ - SET KOREAN (HANGEUL) INPUT MODE
  8464.     AX = 6301h
  8465.     DL = new mode
  8466.         00h return only full characters on DOS keyboard input functions
  8467.         01h return partially-formed (interim) characters also
  8468. Return: AL = status
  8469.         00h successful
  8470.         FFh invalid mode
  8471. SeeAlso: AH=07h,AH=08h,AH=0Bh,AH=63h,AX=6302h
  8472. --------D-216302-----------------------------
  8473. INT 21 - DOS 2.25, Far East DOS 3.2+ - GET KOREAN (HANGEUL) INPUT MODE
  8474.     AX = 6302h
  8475. Return: AL = status
  8476.         00h successful
  8477.         DL = current input mode
  8478.             00h return only full characters (clears interim flag)
  8479.             01h return partial characters (sets interim flag)
  8480.         FFh not supported
  8481. SeeAlso: AH=07h,AH=08h,AH=0Bh,AH=63h,AX=6301h
  8482. --------D-2164-------------------------------
  8483. INT 21 - DOS 3.2+ internal - SET DEVICE DRIVER LOOKAHEAD FLAG
  8484.     AH = 64h
  8485.     AL = flag
  8486.         00h (default) call device driver function 5 (non-dest read)
  8487.             before INT 21/AH=01h,08h,0Ah
  8488.         nonzero don't call driver function 5
  8489. Return: nothing (MS-DOS)
  8490.     CF set, AX=error code??? (DR-DOS 5.0, which does not support this call)
  8491. Notes:    called by DOS 3.3+ PRINT.COM
  8492.     under MS-DOS, this function does not use any of the DOS-internal stacks
  8493.       and may thus be called at any time, even during another DOS call
  8494. SeeAlso: AH=01h,AH=08h,AH=0Ah,AX=5D06h
  8495. --------O-2164--DX0000-----------------------
  8496. INT 21 U - OS/2 v2.0+ Virtual DOS Machine - ENABLE AUTOMATIC TITLE SWITCH
  8497.     AH = 64h
  8498.     DX = 0000h (function number)
  8499.     CX = 636Ch (magic value, "cl")
  8500.     BX = 0000h (indicates special request)
  8501. Note:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  8502.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  8503. SeeAlso: AH=64h/BX=0001h,INT 21/AH=4Bh
  8504. --------O-2164--DX0001-----------------------
  8505. INT 21 U - OS/2 v2.0+ Virtual DOS Machine - SET SESSION TITLE
  8506.     AH = 64h
  8507.     DX = 0001h (function number)
  8508.     CX = 636Ch (magic value, "cl")
  8509.     BX = 0000h (indicates special request)
  8510.     ES:DI -> new ASCIZ title (max 12 char) or "" to restore default title
  8511. Note:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  8512.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  8513. SeeAlso: AH=64h/BX=0000h,AH=64h/BX=0002h,INT 15/AH=12h/BH=05h
  8514. --------O-2164--DX0002-----------------------
  8515. INT 21 U - OS/2 v2.0+ Virtual DOS Machine - GET SESSION TITLE
  8516.     AH = 64h
  8517.     DX = 0002h (function number)
  8518.     CX = 636Ch (magic value, "cl")
  8519.     BX = 0000h (indicates special request)
  8520.     ES:DI -> 13-byte buffer for current title
  8521. Return: buffer filled (single 00h if title never changed)
  8522. Note:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  8523.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  8524. SeeAlso: AH=64h/BX=0000h,AH=64h/BX=0001h,INT 15/AH=12h/BH=05h
  8525. --------O-2164--DX0003-----------------------
  8526. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - GET LASTDRIVE
  8527.     AH = 64h
  8528.     DX = 0003h (function number)
  8529.     CX = 636Ch (magic value, "cl")
  8530.     BX = 0000h (indicates special request)
  8531. Return: AL = highest drive supported
  8532. Notes:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  8533.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  8534.     used by WinOS2
  8535. --------O-2164--DX0004-----------------------
  8536. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - GET SIZE OF PTDA JFT
  8537.     AH = 64h
  8538.     DX = 0004h (function number)
  8539.     CX = 636Ch (magic value, "cl")
  8540.     BX = 0000h (indicates special request)
  8541. Return: AX = number of entries in OS/2 JFT for VDM
  8542. Notes:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  8543.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  8544.     in an OS/2 VDM, the DOS Job File Table in the PSP contains an index
  8545.       into the OS/2 JFT in the Per-Task Data Area rather than an SFT index
  8546.       because the OS/2 SFT can contain more than 255 entries
  8547. --------O-2164--DX0005-----------------------
  8548. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - GET SECOND SFT FLAGS WORD
  8549.     AH = 64h
  8550.     DX = 0005h (function number)
  8551.     CX = 636Ch (magic value, "cl")
  8552.     BX = 0000h (indicates special request)
  8553.     DI = DOS file handle
  8554. Return: AX = value of second flags word from OS/2 SFT entry for file
  8555. Notes:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  8556.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  8557.     the OS/2 SFT has two flags words rather than DOS's one word, and this
  8558.       function provides access to the word which is not present in DOS
  8559. --------O-2164--DX0006-----------------------
  8560. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - UNLOAD DOSKRNL SYMBOLS & LOAD PROGR
  8561.     AH = 64h
  8562.     DX = 0006h (function number)
  8563.     CX = 636Ch (magic value, "cl")
  8564.     BX = 0000h (indicates special request)
  8565.     ES:DI -> ASCIZ filespec
  8566.     DS = base address for loading
  8567. Notes:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  8568.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  8569.     this function is only supported by the kernel debugging version of
  8570.       OS2KRNL
  8571. --------O-2164--DX0007-----------------------
  8572. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - GET WinOS2 CALL GATE ADDRESS
  8573.     AH = 64h
  8574.     DX = 0007h (function number)
  8575.     CX = 636Ch (magic value, "cl")
  8576.     BX = 0000h (indicates special request)
  8577. Return: AX = call gate address
  8578. Notes:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  8579.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  8580.     used by WinOS2 to make direct calls to OS2KRNL, bypassing the overhead
  8581.       of DOSKRNL
  8582. --------O-2164--DX0008-----------------------
  8583. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - GET LOADING MESSAGE
  8584.     AH = 64h
  8585.     DX = 0008h (function number)
  8586.     CX = 636Ch (magic value, "cl")
  8587.     BX = 0000h (indicates special request)
  8588. Return: DS:DX -> '$'-terminated message "Loading.  Please wait."
  8589. Notes:    if CX is not 636Ch on entry, INT 21/AH=6Ch is invoked, because a bug
  8590.       in OS/2 1.x FAPI erroneously called AH=64h instead of AH=6Ch
  8591.     this function permits National Language Support for the initial message
  8592.       displayed while WinOS2 starts a full-screen session
  8593. --------O-2164--CX636C-----------------------
  8594. INT 21 U - OS/2 v2.1+ Virtual DOS Machine - OS/2 API support
  8595.     AH = 64h
  8596.     CX = 636Ch ("cl")
  8597.     BX = API ordinal (see below)
  8598.     other registers as appropriate for API call
  8599.       if ordinal 0025h:
  8600.         DS:SI -> STARTDATA structure (see below)
  8601. Return: as appropriate for API call
  8602.       if ordinal 0025h:
  8603.         AX = return code
  8604.  
  8605. Values for API ordinal:
  8606.  0025h    DOS32StartSession
  8607.  0082h    DosGetCP
  8608.  00A7h    DosQFSAttach
  8609.  00BFh    DosEditName
  8610.  00CBh    DosForceDelete
  8611.  0144h    Dos32CreateEventSem
  8612.  0145h    Dos32OpenEvenSem
  8613.  0146h    Dos32CloseEventSem
  8614.  0147h    Dos32ResetEventSem
  8615.  0148h    Dos32PostEventSem
  8616.  0149h    Dos32WaitEventSem
  8617.  014Ah    Dos32QueryEventSem
  8618.  014Bh    Dos32CreateMutexSem
  8619.  014Ch    Dos32OpenMutexSem
  8620.  014Dh    Dos32CloseMutexSem
  8621.  014Eh    Dos32RequestMutexSem
  8622.  014Fh    Dos32ReleaseMutexSem
  8623.  0150h    Dos32QueryMutexSem
  8624.  0151h    Dos32CreateMuxWaitSem
  8625.  0152h    Dos32OpenMuxWaitSem
  8626.  0153h    Dos32CloseMuxWaitSem
  8627.  0154h    Dos32WaitMuxWaitSem
  8628.  0155h    Dos32AddMuxWaitSem
  8629.  0156h    Dos32DeleteMuxWaitSem
  8630.  0157h    Dos32QueryMuxWaitSem
  8631.  
  8632. Format of STARTDATA structure:
  8633. Offset    Size    Description
  8634.  00h    WORD    length of structure (must be 0018h,001Eh,0020h,0032h,or 003Ch)
  8635.  02h    WORD    relation of new process to caller (00h independent, 01h child)
  8636.  04h    WORD    fore/background (00h foreground, 01h background)
  8637.  06h    WORD    trace options (00h-02h, 00h = no trace)
  8638.  08h    DWORD    pointer to ASCIZ program title (max 62 chars) or 0000h:0000h
  8639.  0Ch    DWORD    pointer to ASCIZ program name (max 128 chars) or 0000h:0000h
  8640.  10h    DWORD    pointer to ASCIZ program args (max 144 chars) or 0000h:0000h
  8641.  14h    DWORD    "TermQ" (currently reserved, must be 00000000h)
  8642.  18h    DWORD    pointer to environment (max 486 bytes) or 0000h:0000h
  8643.  1Ch    WORD    inheritance (00h or 01h)
  8644.  1Eh    WORD    session type
  8645.         00h OS/2 session manager determines type (default)
  8646.         01h OS/2 full-screen
  8647.         02h OS/2 window
  8648.         03h PM
  8649.         04h VDM full-screen
  8650.         07h VDM window
  8651.  20h    DWORD    pointer to ASCIZ icon filename (max 128 chars) or 0000h:0000h
  8652.  24h    DWORD    "PgmHandle" (currently reserved, must be 00000000h)
  8653.  28h    WORD    "PgmControl"
  8654.  2Ah    WORD    initial column
  8655.  2Ch    WORD    initial row
  8656.  2Eh    WORD    initial width
  8657.  30h    WORD    initial height
  8658.  32h    WORD    reserved (0)
  8659.  34h    DWORD    "ObjectBuffer" (currently reserved, must be 00000000h)
  8660.  38h    DWORD    "ObjectBufferLen" (currently reserved, must be 00000000h)
  8661. --------D-2165-------------------------------
  8662. INT 21 - DOS 3.3+ - GET EXTENDED COUNTRY INFORMATION
  8663.     AH = 65h
  8664.     AL = info ID
  8665.         01h get general internationalization info
  8666.         02h get pointer to uppercase table
  8667.         04h get pointer to filename uppercase table
  8668.         05h get pointer to filename terminator table
  8669.         06h get pointer to collating sequence table
  8670.         07h (DOS 4+) get pointer to Double-Byte Character Set table
  8671.     BX = code page (FFFFh=global code page)
  8672.     DX = country ID (FFFFh=current country)
  8673.     ES:DI -> country information buffer (see below)
  8674.     CX = size of buffer (>= 5)
  8675. Return: CF set on error
  8676.         AX = error code (see AH=59h)
  8677.     CF clear if succesful
  8678.         CX = size of country information returned
  8679.         ES:DI -> country information
  8680. Notes:    AL=05h appears to return same info for all countries and codepages; it
  8681.       has been documented for DOS 5+, but was undocumented in ealier
  8682.       versions
  8683.     NLSFUNC must be installed to get info for countries other than the
  8684.       default
  8685.     subfunctions 02h and 04h are identical under OS/2
  8686. SeeAlso: AH=38h,INT 2F/AX=1401h,INT 2F/AX=1402h,INT 2F/AX=14FEh
  8687.  
  8688. Format of country information:
  8689. Offset    Size    Description
  8690.  00h    BYTE    info ID
  8691. ---if info ID = 01h---
  8692.  01h    WORD    size
  8693.  03h    WORD    country ID
  8694.  05h    WORD    code page
  8695.  07h 34 BYTEs    country-dependent info (see AH=38h)
  8696. ---if info ID = 02h---
  8697.  01h    DWORD    pointer to uppercase table (see below)
  8698. ---if info ID = 04h---
  8699.  01h    DWORD    pointer to filename uppercase table (see below)
  8700. ---if info ID = 05h---
  8701.  01h    DWORD    pointer to filename character table (see below)
  8702. ---if info ID = 06h---
  8703.  01h    DWORD    pointer to collating table (see below)
  8704. ---if info ID = 07h (DOS 4+)---
  8705.  01h    DWORD    pointer to DBCS lead byte table (see below)
  8706.  
  8707. Format of uppercase table:
  8708. Offset    Size    Description
  8709.  00h    WORD    table size
  8710.  02h 128 BYTEs    uppercase equivalents (if any) of chars 80h to FFh
  8711.  
  8712. Format of collating table:
  8713. Offset    Size    Description
  8714.  00h    WORD    table size
  8715.  02h 256 BYTEs    values used to sort characters 00h to FFh
  8716.  
  8717. Format of filename terminator table:
  8718. Offset    Size    Description
  8719.  00h    WORD    table size (not counting this word)
  8720.  02h    BYTE    ??? (01h for MS-DOS 3.30-6.00)
  8721.  03h    BYTE    lowest permissible character value for filename
  8722.  04h    BYTE    highest permissible character value for filename
  8723.  05h    BYTE    ??? (00h for MS-DOS 3.30-6.00)
  8724.  06h    BYTE    first excluded character in range \ all characters in this
  8725.  07h    BYTE    last excluded character in range  / range are illegal
  8726.  08h    BYTE    ??? (02h for MS-DOS 3.30-6.00)
  8727.  09h    BYTE    number of illegal (terminator) characters
  8728.  0Ah  N BYTES    characters which terminate a filename:    ."/\[]:|<>+=;,
  8729. Note:    partially documented for DOS 5+, but undocumented for earlier versions
  8730.  
  8731. Format of filename uppercase table:
  8732. Offset    Size    Description
  8733.  00h    WORD    table size
  8734.  02h 128 BYTEs    uppercase equivalents (if any) of chars 80h to FFh
  8735.  
  8736. Format of DBCS lead byte table:
  8737. Offset    Size    Description
  8738.  00h    WORD    length
  8739.  02h 2N BYTEs    start/end for N lead byte ranges
  8740.     WORD    0000h    (end of table)
  8741. --------D-2165-------------------------------
  8742. INT 21 - DOS 4+ - COUNTRY-DEPENDENT CHARACTER CAPITALIZATION
  8743.     AH = 65h
  8744.     AL = function
  8745.         20h capitalize character
  8746.         DL = character to capitalize
  8747.         Return: DL = capitalized character
  8748.         21h capitalize string
  8749.         DS:DX -> string to capitalize
  8750.         CX = length of string
  8751.         22h capitalize ASCIZ string
  8752.         DS:DX -> ASCIZ string to capitalize
  8753. Return: CF set on error
  8754.         AX = error code (see AH=59h)
  8755.     CF clear if successful
  8756. Note:    these calls have been documented for DOS 5+, but were undocumented in
  8757.       DOS 4.x.
  8758. --------D-216523-----------------------------
  8759. INT 21 U - DOS 4+ internal - DETERMINE IF CHARACTER REPRESENTS YES/NO RESPONSE
  8760.     AX = 6523h
  8761.     DL = character
  8762.     DH = second character of double-byte character (if applicable)
  8763. Return: CF set on error
  8764.     CF clear if successful
  8765.         AX = type
  8766.         00h no
  8767.         01h yes
  8768.         02h neither yes nor no
  8769. --------D-2165-------------------------------
  8770. INT 21 U - DOS 4+ internal - COUNTRY-DEPENDENT FILENAME CAPITALIZATION
  8771.     AH = 65h
  8772.     AL = function
  8773.         A0h capitalize filename character
  8774.         DL = character to capitalize
  8775.         Return: DL = capitalized character
  8776.         A1h capitalize counted filename string
  8777.         DS:DX -> filename string to capitalize
  8778.         CX = length of string
  8779.         A2h capitalize ASCIZ filename
  8780.         DS:DX -> ASCIZ filename to capitalize
  8781. Return: CF set on error
  8782.         AX = error code (see AH=59h)
  8783.     CF clear if successful
  8784. Note:    nonfunctional in DOS 4.00 through 6.00 due to a bug (the code sets a
  8785.       pointer depending on the high bit of AL, but doesn't clear the
  8786.       bit before branching by function number).
  8787. --------D-216601-----------------------------
  8788. INT 21 - DOS 3.3+ - GET GLOBAL CODE PAGE TABLE
  8789.     AX = 6601h
  8790. Return: CF set on error
  8791.         AX = error code (see AH=59h)
  8792.     CF clear if successful
  8793.         BX = active code page (see AX=6602h)
  8794.         DX = system code page
  8795. SeeAlso: AX=6602h
  8796. --------D-216602-----------------------------
  8797. INT 21 - DOS 3.3+ - SET GLOBAL CODE PAGE TABLE
  8798.     AX = 6602h
  8799.     BX = active code page (see below)
  8800.     DX = system code page (active page at boot time)
  8801. Return: CF set on error
  8802.         AX = error code (see AH=59h)
  8803.     CF clear if successful
  8804. SeeAlso: AX=6601h,INT 2F/AX=14FFh
  8805.  
  8806. Values for code page:
  8807.  437    US
  8808.  850    Multilingual
  8809.  852    Slavic/Latin II (DOS 5+)
  8810.  857    Turkish
  8811.  860    Portugal
  8812.  861    Iceland
  8813.  863    Canada (French)
  8814.  865    Norway/Denmark
  8815. --------D-2167-------------------------------
  8816. INT 21 - DOS 3.3+ - SET HANDLE COUNT
  8817.     AH = 67h
  8818.     BX = size of new file handle table for process
  8819. Return: CF clear if successful
  8820.     CF set on error
  8821.         AX = error code (see AH=59h)
  8822. Desc:    adjust the size of the per-process open file table, thus raising or
  8823.       lowering the limit on the number of files the caller can open
  8824.       simultaneously
  8825. Notes:    if BX <= 20, no action is taken if the handle limit has not yet been
  8826.       increased, and the table is copied back into the PSP if the limit
  8827.       is currently > 20 handles
  8828.     for file handle tables of > 20 handles, DOS 3.30 never reuses the
  8829.       same memory block, even if the limit is being reduced; this can lead
  8830.       to memory fragmentation as a new block is allocated and the existing
  8831.       one freed
  8832.     only the first 20 handles are copied to child processes in DOS 3.3-6.0
  8833.     increasing the file handles here will not, in general, increase the
  8834.       number of files that can be opened using the runtime library of a
  8835.       high-level language such as C
  8836. BUGS:    the original release of DOS 3.30 allocates a full 64K for the handle
  8837.       table on requests for an even number of handles
  8838.     DR-DOS 3.41 and 5.0 will lose track of any open file handles beyond
  8839.       the portion of the JFT retained after the call; MS-DOS will indicate
  8840.       error 04h if any of the JFT entries to be removed are open
  8841. SeeAlso: AH=26h,AH=86h
  8842. --------D-2168-------------------------------
  8843. INT 21 - DOS 3.3+ - "FFLUSH" - COMMIT FILE
  8844.     AH = 68h
  8845.     BX = file handle
  8846. Return: CF clear if successful
  8847.         all data still in DOS disk buffers is written to disk immediately,
  8848.           and the file's directory entry is updated
  8849.     CF set on error
  8850.         AX = error code (see AH=59h)
  8851. SeeAlso: AX=5D01h,AH=6Ah,INT 2F/AX=1107h
  8852. --------D-2169-------------------------------
  8853. INT 21 U - DOS 4+ internal - GET/SET DISK SERIAL NUMBER
  8854.     AH = 69h
  8855.     AL = subfunction
  8856.         00h get serial number
  8857.         01h set serial number
  8858.     BL = drive (0=default, 1=A, 2=B, etc)
  8859.     DS:DX -> disk info (see below)
  8860. Return: CF set on error
  8861.         AX = error code (see AH=59h)
  8862.     CF clear if successful
  8863.         AX destroyed
  8864.         (AL = 00h) buffer filled with appropriate values from extended BPB
  8865.         (AL = 01h) extended BPB on disk set to values from buffer
  8866. Notes:    does not generate a critical error; all errors are returned in AX
  8867.     error 0005h given if no extended BPB on disk
  8868.     does not work on network drives (error 0001h)
  8869.     buffer after first two bytes is exact copy of bytes 27h thru 3Dh of
  8870.       extended BPB on disk
  8871.     this function is supported under Novell NetWare versions 2.0A through
  8872.       3.11; the returned serial number is the one a DIR would display,
  8873.       the volume label is the NetWare volume label, and the file system
  8874.       is set to "FAT16".
  8875.     the serial number is computed from the current date and time when the
  8876.       disk is created; the first part is the sum of the seconds/hundredths
  8877.       and month/day, the second part is the sum of the hours/minutes and
  8878.       year
  8879.     the volume label which is read or set is the one stored in the extended
  8880.       BPB on disks formatted with DOS 4.0+, rather than the special root
  8881.       directory entry used by the DIR command in COMMAND.COM (use AH=11h
  8882.       to find that volume label)
  8883. SeeAlso: AX=440Dh
  8884.  
  8885. Format of disk info:
  8886. Offset    Size    Description
  8887.  00h    WORD    info level (zero)
  8888.  02h    DWORD    disk serial number (binary)
  8889.  06h 11 BYTEs    volume label or "NO NAME    " if none present
  8890.  11h  8 BYTEs    (AL=00h only) filesystem type--string "FAT12   " or "FAT16   "
  8891. --------O-2169-------------------------------
  8892. INT 21 - DR-DOS 5.0 - NULL FUNCTION
  8893.     AH = 69h
  8894. Return: AL = 00h
  8895. SeeAlso: AH=18h
  8896. --------v-216969-----------------------------
  8897. INT 21 - VIRUS - "Rape-747" - INSTALLATION CHECK
  8898.     AX = 6969h
  8899. Return: AX = 0666h if resident
  8900. SeeAlso: AX=58CCh,AH=76h"VIRUS"
  8901. --------d-2169FFDX0000-----------------------
  8902. INT 21 U - CUBIT v4.00 - GET CUBIT INT 21 HANDLER
  8903.     AX = 69FFh
  8904.     DX = 0000h
  8905.     BX = CB00h (magic value)
  8906. Return: ES:BX -> CUBITR.EXE handler for INT 21
  8907. Note:    the installation check consists of testing that the first eight bytes
  8908.       at the returned interrupt handler are EBh 07h "CUBITR" (a short
  8909.       jump around the signature followed by the signature); the byte
  8910.       following the signature (i.e. ES:[BX+8]) indicates whether CUBITR
  8911.       is active (01h) or disabled (00h)
  8912. SeeAlso: AX=69FFh/DX=CFBFh
  8913. Index:    installation check;CUBIT
  8914. --------d-2169FFDXCFBF-----------------------
  8915. INT 21 U - CUBIT v4.00 - UNINSTALL
  8916.     AX = 69FFh
  8917.     DX = CFBFh
  8918.     CX = EFCFh
  8919.     BX = CB00h (magic value)
  8920. Return: ES:BX -> CUBITR.EXE handler for INT 21
  8921.     CX = status
  8922.         2020h successful
  8923.         2222h failed
  8924. Note:    if DX is neither 0000h nor CFBFh on entry, some other code is executed
  8925. SeeAlso: AX=69FFh/DX=0000h
  8926. --------D-216A-------------------------------
  8927. INT 21 U - DOS 4+ - COMMIT FILE
  8928.     AH = 6Ah
  8929.     BX = file handle
  8930. Return: CF clear if successful
  8931.         AH = 68h
  8932.     CF set on error
  8933.         AX = error code (06h) (see AH=59h)
  8934. Note:    identical to AH=68h in DOS 5.0-6.0; not known whether this is the case
  8935.       in DOS 4.x
  8936. SeeAlso: AH=68h
  8937. --------D-216B-------------------------------
  8938. INT 21 U - DOS 4.0 internal - IFS IOCTL
  8939.     AH = 6Bh
  8940.     AL = subfunction
  8941.         00h ???
  8942.         DS:SI -> Current Directory Structure???
  8943.         CL = drive (1=A:)
  8944.         01h ???
  8945.         DS:SI -> ???
  8946.         CL = file handle???
  8947.         02h ???
  8948.         DS:SI -> Current Directory Structure???
  8949.         DI = ???
  8950.         CX = drive (1=A:)
  8951. Return: CF set on error
  8952.         AX = error code (see INT 21/AH=59h)
  8953.     CF clear if successful
  8954. Note:    passed through to INT 2F/AX=112Fh with AX on top of stack
  8955. SeeAlso: AH=6Bh"DOS 5",INT 2F/AX=112Fh
  8956. --------D-216B-------------------------------
  8957. INT 21 U - DOS 5+ - NULL FUNCTION
  8958.     AH = 6Bh
  8959. Return: AL = 00h
  8960. Note:    this function does nothing and returns immediately
  8961. SeeAlso: AH=6Bh"DOS 4"
  8962. --------D-216C00-----------------------------
  8963. INT 21 - DOS 4+ - EXTENDED OPEN/CREATE
  8964.     AX = 6C00h
  8965.     BL = open mode as in AL for normal open (see INT 21/AH=3Dh)
  8966.         bit 7: inheritance
  8967.         bits 4-6: sharing mode
  8968.         bit 3 reserved
  8969.         bits 0-2: access mode
  8970.     BH = flags
  8971.         bit 6 = auto commit on every write (see also AH=68h)
  8972.         bit 5 = return error rather than doing INT 24h
  8973.     CX = create attribute
  8974.         bits 6-15 reserved
  8975.         bit 5: archive
  8976.         bit 4: reserved
  8977.         bit 3: volume label
  8978.         bit 2: system
  8979.         bit 1: hidden
  8980.         bit 0: readonly
  8981.     DL = action if file exists/does not exists
  8982.         bits 7-4 action if file does not exist
  8983.             0000 fail
  8984.             0001 create
  8985.         bits 3-0 action if file exists
  8986.             0000 fail
  8987.             0001 open
  8988.             0010 replace/open
  8989.     DH = 00h (reserved)
  8990.     DS:SI -> ASCIZ file name
  8991. Return: CF set on error
  8992.        AX = error code (see AH=59h)
  8993.     CF clear if successful
  8994.        AX = file handle
  8995.        CX = status
  8996.         1 file opened
  8997.         2 file created
  8998.         3 file replaced
  8999. Note:    the PC LAN Program only supports DL=01h, DL=10h/sharing=compatibility,
  9000.       and DL=12h
  9001. SeeAlso: AH=3Ch,AH=3Dh,AX=6C01h
  9002. --------O-216C01-----------------------------
  9003. INT 21 U - OS/2 v2.0 - "DosOpen2"
  9004.     AX = 6C01h
  9005.     ???
  9006. Return: ???
  9007. Note:    this function is similar to AX=6C00h, but supports OS/2's extended
  9008.       attributes
  9009. SeeAlso: AX=5704h,AX=6C00h,AH=6Fh"OS/2"
  9010. --------D-216D-------------------------------
  9011. INT 21 U - DOS 5+ ROM - FIND FIRST ROM PROGRAM
  9012.     AH = 6Dh
  9013.     DS:DX -> ASCIZ program name
  9014. Return: CF clear if found
  9015.         [DTA] = ASCIZ name found
  9016.     CF set if not found
  9017. SeeAlso: AH=6Eh,AH=6Fh
  9018. --------O-216D-------------------------------
  9019. INT 21 U - OS/2 v1.x FAPI - "DosMkDir2"
  9020.     AH = 6Dh
  9021.     ???
  9022. Return: ???
  9023. Note:    also supported by OS/2 v2.0+ Virtual DOS Machines
  9024. SeeAlso: AH=39h
  9025. --------D-216E-------------------------------
  9026. INT 21 U - DOS 5+ ROM - FIND NEXT ROM PROGRAM
  9027.     AH = 6Eh
  9028.     [DTA] = result of previous FindFirst ROM
  9029. Return: CF clear if found
  9030.         [DTA] = ASCIZ name found
  9031.     CF set if not found
  9032. SeeAlso: AH=6Dh
  9033. --------O-216E-------------------------------
  9034. INT 21 U - OS/2 v1.x FAPI - "DosENumAttrib"
  9035.     AH = 6Eh
  9036.     ???
  9037. Return: ???
  9038. Note:    also supported by OS/2 v2.0+ Virtual DOS Machines
  9039. SeeAlso: AX=5703h,AH=6Fh"OS/2",INT 2F/AX=112Dh
  9040. --------O-216F-------------------------------
  9041. INT 21 U - OS/2 v1.x FAPI - "DosQMaxEASize" - GET MAXIMUM SIZE OF EXTENDED ATTR
  9042.     AH = 6Fh
  9043.     ???
  9044. Return: ???
  9045. Note:    also supported by OS/2 v2.0+ Virtual DOS Machines
  9046. SeeAlso: AX=5703h,AX=6C01h,AH=6Eh"OS/2"
  9047. --------D-216F00-----------------------------
  9048. INT 21 U - DOS 5+ ROM - GET ROM SCAN START ADDRESS
  9049.     AX = 6F00h
  9050. Return: BX = current ROM scan starting segment
  9051. SeeAlso: AH=6DH,AX=6F01h,AX=6F02h
  9052. ----------216F01-----------------------------
  9053. INT 21 U - DOS 5+ ROM - SET ROM SCAN START ADDRESS
  9054.     AX = 6F01h
  9055.     BX = new ROM scan starting address
  9056. SeeAlso: AX=6F00h,AX=6F03h
  9057. ----------216F02-----------------------------
  9058. INT 21 U - DOS 5+ ROM - GET EXCLUSION REGION LIST
  9059.     AX = 6F02h
  9060.     ES:BX -> buffer for exclusion region list (see below)
  9061. Return: ES:BX = 0000h:0000h on error, unchanged if buffer filled
  9062. SeeAlso: AX=6F00h,AX=6F03h
  9063.  
  9064. Format of exclusion region list:
  9065. Offset    Size    Description
  9066.  00h    WORD    number of entries
  9067.  02h 2N WORDs    start/end segments of N excluded regions
  9068. ----------216F03-----------------------------
  9069. INT 21 U - DOS 5+ ROM - SET EXCLUSION REGION LIST
  9070.     AX = 6F03h
  9071.     DS:DX -> new exclusion region list (see AX=6F02h)
  9072. Note:    DOS saves only the pointer and assumes that the contents of the list
  9073.       are never changed, and that regions do not overlap
  9074. SeeAlso: AX=6F01h,AX=6F02h
  9075. ----------217070BX6060-----------------------
  9076. INT 21 - PCW Weather Card interface - GET DATA SEGMENT
  9077.     AX = 7070h
  9078.     BX = 6060h
  9079.     CX = 7070h
  9080.     DX = 7070h
  9081.     SX = 7070h
  9082.     DX = 7070h
  9083. Return: AX = segment of data structure
  9084. Notes:    the data structure is at offset 516 from this segment.
  9085.     the update byte is at offset 514 from this segment.  Updates are
  9086.       once per second while this byte is nonzero and it is decremented
  9087.       once per second.  While this byte is 0 updates are once per minute.
  9088. SeeAlso: AX=7070h/BX=7070h
  9089.  
  9090. Format of data structure:
  9091. Offset    Type    Description
  9092.  00h    WORD    hour
  9093.  02h    WORD    minute
  9094.  04h    WORD    second
  9095.  06h    WORD    day
  9096.  08h    WORD    month
  9097.  0Ah    WORD    year
  9098.  0Ch    WORD    ???
  9099.  0Eh    WORD    relative barometric pressure (in 1/100 inches)
  9100.  10h    WORD    ???
  9101.  12h    WORD    ???
  9102.  14h    WORD    temperature 1 (in 1/10 degrees F)
  9103.  16h    WORD    temperature 1 lowest (in 1/10 degrees F)
  9104.  18h    WORD    temperature 1 highest (in 1/10 degrees F)
  9105.  1Ah    WORD    temperature 2 (in 1/10 degrees F)
  9106.  1Ch    WORD    temperature 2 lowest (in 1/10 degrees F)
  9107.  1Eh    WORD    temperature 2 highest (in 1/10 degrees F)
  9108.  20h    WORD    wind speed (in MPH)
  9109.  22h    WORD    average of 60 wind speed samples (in MPH)
  9110.  24h    WORD    highest wind speed (in MPH)
  9111.  26h    WORD    wind chill factor  (in 1/10 degrees F)
  9112.  28h    WORD    lowest wind chill factor (in 1/10 degrees F)
  9113.  2Ah    WORD    ???
  9114.  2Ch    WORD    wind direction (in degrees)
  9115.  2Eh    WORD    accumulated daily rainfall (in 1/10 inches)
  9116.  30h    WORD    accumulated annual rainfall (in 1/10 inches)
  9117. ----------217070BX7070-----------------------
  9118. INT 21 - PCW Weather Card interface - INSTALLATION CHECK
  9119.     AX = 7070h
  9120.     BX = 7070h
  9121.     CX = 7070h
  9122.     DX = 7070h
  9123.     SX = 7070h
  9124.     DX = 7070h
  9125. Return: AX = 0070h
  9126.     BX = 0070h
  9127.     CX = 0070h
  9128.     DX = 0070h
  9129.     SX = 0070h
  9130.     DX = 0070h
  9131. SeeAlso: AX=7070h/BX=6060h,AX=8080h
  9132. --------v-2176-------------------------------
  9133. INT 21 - VIRUS - "Klaeren"/"Hate" - INSTALLATION CHECK
  9134.     AH = 76h
  9135. Return: AL = 48h if resident
  9136. SeeAlso: AX=6969h,AX=7700h"VIRUS"
  9137. --------U-217761-----------------------------
  9138. INT 21 - WATCH.COM v3.2+ - INSTALLATION CHECK
  9139.     AX = 7761h ('wa')
  9140. Return: AX = 6177h
  9141. Note:    WATCH.COM is part of the "TSR" package by TurboPower Software
  9142. SeeAlso: INT 16/AX=7761h
  9143. --------v-217700-----------------------------
  9144. INT 21 - VIRUS - "Growing Block" - INSTALLATION CHECK
  9145.     AX = 7700h
  9146. Return: AX = 0920h if resident
  9147. SeeAlso: AH=76h,AH=7Fh
  9148. ----------217734-----------------------------
  9149. INT 21 U - SCROLLit v1.7 - INSTALLATION CHECK
  9150.     AX = 7734h
  9151. Return: DX = 3477h if installed
  9152.         AX = segment of resident code
  9153. Program: ScrollIt is a shareware backscroll utility by Bromfield Software
  9154.       Products
  9155. --------v-217F-------------------------------
  9156. INT 21 - VIRUS - "Squeaker" - INSTALLATION CHECK
  9157.     AH = 7Fh
  9158. Return: AH = 80h if resident
  9159. SeeAlso: AX=7700h,AH=83h"VIRUS"
  9160. --------!------------------------------------
  9161.